Group: comp.os.linux.setup


Subject: Lowercase renaming
From: Chris Davies
Date: 12/14/2007 5:13:39 PM
Marco A. Cruz Quevedo <macruzq@myway.com> wrote: > Is there an easy, fast, single or double click way to rename a whole > directory filenames to lower case? Quick fast hack, all as one line: for F in *; do mv "$F" `echo "$F" | tr '[:upper:]' '[:lower:]'`; done It'll produce errors for all files that are already named entirely in lowercase; ignore them. It also ignores all files starting with a dot. Consider what you want to happen with the set of files "ABC.txt", "Abc.txt", and "abc.txt", which all map to "abc.txt". Chris