Sunday, April 22, 2012

How to rename multiple files in Ubuntu?

Using the rename command and Perl expression. In the terminal:

To rename all upper case file names with extension .JPG to lower case

Test first.
rename -n 'y/A-Z/a-z/' *.JPG

Execute and show the operation.
rename -v 'y/A-Z/a-z/' *.JPG

To remove all colon character out of of the file name:
rename -vn 's/[:]//g' *

To remove all non-alphanumeric characters:
rename -vn 's/[^A-Za-z0-9._]//g' *

For more inforation, type 'man rename'

No comments:

Post a Comment

install dotnet on Mac

https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.411-macos-arm64-installer Checksum (SHA512) 806889dd230d89e7ff0718a0be0...