Skip to content

Instantly share code, notes, and snippets.

@Stasevi4
Created October 8, 2014 22:26
Show Gist options
  • Save Stasevi4/84911b914b6e189778c7 to your computer and use it in GitHub Desktop.
Save Stasevi4/84911b914b6e189778c7 to your computer and use it in GitHub Desktop.
Rename Files and folder to lowercase Linux
This is a good one liner command, specially when dealing with lots of files that you want to change its names from upper-case to lower-case.
for f in * ; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done
That will work on all files in the current folder, if you want more specific files use this form
for f in `find . -name '*.rar'` ; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done
This last case, will look for files with .rar extension, you can use find with all its options to improve your search.
@Stasevi4
Copy link
Author

Stasevi4 commented Oct 8, 2014

Rename Files and folder to lowercase Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment