-1

At the beginning, I have to say I've never used Linux (and bash) before, so please be forgiving :) (Also: sorry if I duplicate a topic - yes, I searched stack but didn't find a good answer).

The problem is - I have to write a pipe, which rename all the files (and only files) in current directory - all uppercase to lower. For example:

   File.txt >>> file.txt
   FiLeEeE2.jpG >>> fileeee2.jpg
   FILE.rtf >>> file.rtf

All I know is I (probably) should use ls -1, mv, sed and |, but I don't know how to merge it :/

Thanks for your help and time. J.

jedrzejginter
  • 402
  • 3
  • 10

1 Answers1

0

Run the below find command on the directory where the files you want to rename is located.

find . -type f -exec rename 's/(.*)/\L$1/' {} \;
Avinash Raj
  • 172,303
  • 28
  • 230
  • 274