How do I make all filenames in a directory lowercase?
-
for i in *; do mv $i `echo $i | tr [A-Z] [a-z]`; done
-
ls | mv $i | tr [A-Z] [a-z];
-
ls | for I in do mv $i | tr [A-Z] [a-z]; done
-
None
A
Correct answer
Explanation
The loop iterates over all files in the directory and uses mv along with tr to translate uppercase characters [A-Z] to lowercase [a-z] for each filename.