This Linux command replaces characters of file names that Windows considers invalid with an underscore, to make the files accessible and manageable on Windows again. Renamed files are logged to record their original names.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename -v "s/(:|\"|\*|\\|\||\&|\?|\%|\<|\>)/_/g" .* * |tee -a renamed_files.$(date +%Y%m%d%H%M%S).log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment