[Clipart] xargs rename isn't working...

Michael Moore stuporglue at gmail.com
Sun Apr 2 15:13:50 PDT 2006


> Try running it on just a few files and see if it works.  If it does,
> then the quantity of files or possibly the length of one of the
> filenames may be the issue.

Hm. There were ~1400 files in the original list. I then did

find . -name "* *" | grep x | xargs rename ' ' '_'

with the grep x, that's only 13 files,  but still no result.

(... moments later...)

Seems there's a command "rename" which takes a list of files and a
regex. It's in Perl, and handled all the files at once, replacing all
the spaces at once. The command was:

find . -name "* *" | rename s/\ /_/g

If rename is a standard utility, or at least standard with Perl, maybe
the command in the release procedure should be changed as this one
gets rid of all spaces at once.

--
Michael Moore
-------------------------------
www.stuporglue.org -- Donate your used computer to a student that needs it.
www.ubuntu-utah.org -- In Utah? Interested in Ubuntu? Come join us.



More information about the clipart mailing list