I have large samples in a folder with plain names and file names with spaces also
and i want to renames all the files to its corresponding md5sum.
I tried this logic for f in $(find /home/SomeFolder/ -type f) ;do mv "$f" "$(md5sum $f)";done
But this is not working properly with some error like mv: cannot move to
indicating no such directory.
Also i tried this logic Rename files to md5 sum + extension (BASH) and tried this for f in $(find /home/Testing/ -type f) ;do echo
md5sum $f;mv $f /home/Testing/"echo
md5sum $f``"; done;
`
But it is not working.
Any suggestions to solve this.
I want to replace a file to its md5sum name without any extension
sample.zip --> c75b5e2ca63adb462f4bb941e0c9f509
c75b5e2ca63adb462f4bb941e0c9f509c75b5e2ca63adb462f --> c75b5e2ca63adb462f4bb941e0c9f509
file name with spaces.php --> a75b5e2ca63adb462f4bb941e0c9f509