www.LinuxHowtos.org

edit this article

Renaming Files

Often files need to be converted from uppercase to lowercase. Sometimes this is a side effect of moving from case-insensitive file systems to case-sensitive ones.

Here's a quick shell command that will convert everything in the current directory from uppercase to lowercase.

Code Listing 1

for n in *; do mv $n `echo $n | tr '[ :upper:]' '[ :lower:]'`; done

From http://www.gentoo.org/news/en/gwn/20040510-newsletter.xml


rate this article:
current rating: average rating: 1.0 (19 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back