Friday, January 17, 2020

Linux rename file to all lower case


Basic for a directory that only contains files

for file in $(ls); do mv -i ${file} ${file,,}; done

Ignoring directories that contain directories

for file in $(ls -F |grep -v /); do mv -i ${file} ${file,,}; done

No comments: