convert filenames in current directory to lowercase

rename 'y/A-Z/a-z/' *
The simplest way I know.
Sample Output
gfagreaa renamed as GFAGREAA
gfdfhf renamed as GFDFHF
req renamed as REQ
rewqr renamed as REVQR

22
By: Karakh
2009-10-11 11:36:07

12 Alternatives + Submit Alt

What Others Think

I had taken note of this command, this was useful to convert the file names of my camera I do not know why that makes the extension of the file type in uppercase. Yesterday I re showing it to a person who boasted Windows 7. I asked him if he were able to rename to less than 1 minute all the files in a folder. Of course opened explorer and did not even had time to change the name of the first file (by hand) that this command had already finished. So I will sign a +1 to Karakh
0disse0 · 370 weeks and 3 days ago
Curiously, this does not work for me at all (on SLES 11 SP1, using bash 3.2.51, rename version string: "rename (util-linux-ng 2.16)"). The man page shows a differing syntax, too. Which version of rename are you using?
baerbl · 350 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: