Comments on: Rename All Files and Directory Names to Lowercase in Linux https://www.tecmint.com/rename-all-files-and-directory-names-to-lowercase-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Fri, 14 Jul 2023 07:20:40 +0000 hourly 1 By: Benja https://www.tecmint.com/rename-all-files-and-directory-names-to-lowercase-in-linux/comment-page-1/#comment-1827020 Thu, 16 Jun 2022 11:16:31 +0000 https://www.tecmint.com/?p=27155#comment-1827020 Hi, you can execute your first option with a single command:

find Files -depth -exec rename -v -f 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \+

]]>
By: Justin https://www.tecmint.com/rename-all-files-and-directory-names-to-lowercase-in-linux/comment-page-1/#comment-1210736 Thu, 25 Jul 2019 18:19:33 +0000 https://www.tecmint.com/?p=27155#comment-1210736 Might be easier in a for loop using var substitution.

$ for i in ./*; do echo $i ${i,,}; done

Replace “echo” with “mv”.

]]>
By: Stefan https://www.tecmint.com/rename-all-files-and-directory-names-to-lowercase-in-linux/comment-page-1/#comment-1161031 Fri, 07 Jun 2019 10:08:11 +0000 https://www.tecmint.com/?p=27155#comment-1161031 Does this command also work in CentOS 7?

# find Files -depth | xargs -n 1 rename -v 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

I don’t get an error but it doesn’t seem to work.

Is it also possible to prepare this command so that spaces are replaced by a _ or –

]]>