11/08/2019

linux rename all the files with special characters

This one just strip the special characters from filenames
for file in *; do mv "$file" `echo $file | tr -cd '.A-Za-z0-9_-'` ; done
Námásté Egész-ség.mkv --> NmstEgsz-sg.mkv
put echo after ; do to test before, like:
for file in *; do echo mv "$file" `echo $file | tr -cd '.A-Za-z0-9_-'` ; done


https://unix.stackexchange.com/questions/216659/how-to-rename-all-files-with-special-characters-and-spaces-in-a-directory/218291