diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-discuss/2013-January/009033.html | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-discuss/2013-January/009033.html')
-rw-r--r-- | zarb-ml/mageia-discuss/2013-January/009033.html | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/zarb-ml/mageia-discuss/2013-January/009033.html b/zarb-ml/mageia-discuss/2013-January/009033.html new file mode 100644 index 000000000..bd44c2141 --- /dev/null +++ b/zarb-ml/mageia-discuss/2013-January/009033.html @@ -0,0 +1,88 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-discuss] Debian-style «rename» utility? + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20%3D%3Fiso-8859-1%3Fq%3FDebian-style_%3DABrename%3DBB_utility%3F%3D%0A%09%3D%3Fiso-8859-1%3Fq%3F%3D3F%3F%3D&In-Reply-To=%3C201301012158.16519.cooker%40solbu.net%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + + <LINK REL="Next" HREF="009034.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-discuss] Debian-style «rename» utility?</H1> + <B>Johnny A. Solbu</B> + <A HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20%3D%3Fiso-8859-1%3Fq%3FDebian-style_%3DABrename%3DBB_utility%3F%3D%0A%09%3D%3Fiso-8859-1%3Fq%3F%3D3F%3F%3D&In-Reply-To=%3C201301012158.16519.cooker%40solbu.net%3E" + TITLE="[Mageia-discuss] Debian-style «rename» utility?">cooker at solbu.net + </A><BR> + <I>Tue Jan 1 21:58:12 CET 2013</I> + <P><UL> + + <LI>Next message: <A HREF="009034.html">[Mageia-discuss] Debian-style «rename» utility? +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#9033">[ date ]</a> + <a href="thread.html#9033">[ thread ]</a> + <a href="subject.html#9033">[ subject ]</a> + <a href="author.html#9033">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Sometimes I need to mass rename filenames, to replace norwegian special caracters, to make things work across samba. +On Debian th rename utility user «sed» style replacements, which means one command can replace all instances of a character or string recursively in all subfolders. But on Mandriva and Mageia, I have to run the exact same command multiple times in the same folder to do the same thing. And I can't do it recursively. + +One example. Say I want to recursively replace all spaces ' ' with an underscore '_' on all files in every subfolder under «folder2» + +On Debian: + replace 's/\ /_/g' folder2/ + +On Mageia: + cd folder2 + replace ' ' '_' * + replace ' ' '_' * + replace ' ' '_' * + replace ' ' '_' * + + cd subfolder1 + replace ' ' '_' * + <repeating> + <repeating> + ...... +and so on. + +Is there a command line utility on Mageia that can do this te way Debian does this, without resorting to creating a shellscript each time I need to replace something? (I'm no good at scripting, so I've had to do this manually for some 11 years.) + +-- +Johnny A. Solbu +PGP key ID: 0xFA687324 +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: not available +Type: application/pgp-signature +Size: 190 bytes +Desc: This is a digitally signed message part. +URL: </pipermail/mageia-discuss/attachments/20130101/352086aa/attachment.asc> +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + + <LI>Next message: <A HREF="009034.html">[Mageia-discuss] Debian-style «rename» utility? +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#9033">[ date ]</a> + <a href="thread.html#9033">[ thread ]</a> + <a href="subject.html#9033">[ subject ]</a> + <a href="author.html#9033">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-discuss">More information about the Mageia-discuss +mailing list</a><br> +</body></html> |