[Gllug] Mass renaming of files

Matthew King matthew.king at monnsta.net
Thu May 8 10:46:48 UTC 2003


> a) Find all the files under a certain directory where the filename
> includes a :

Find.

$ find $DIR -name '*:*' -print

(the -print isn't needed on linux)

> b) Rename these files to replace the : with a - or possibly remove the
> colon altogether.

I've seen a myriad of exciting looking solutions to this, but the simplest
by far is:
$ mmv '*:*' '#1-#2'

Though you will have to find and install mmv.

Have fun

Matthew

-- 
GIT/CM/M d++(-) s++: a--->? C++++ UL++++$ +++>++++ L+++ E>++ W-- N+ o?
K++  w--- O-- M+ V? PS+>++ PE(--) Y+>++ PGP+++@ t+ 5-- X+(-) R tv-
b++>++++ DI++++ D++ G++ e(*) h!>++ r-- y->++++





-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list