Last active
January 5, 2018 01:41
-
-
Save lgallen/a3ea7645eea496044bd602f129647dab to your computer and use it in GitHub Desktop.
Linux command useful for removing leading characters when all filenames in a directory have the same format
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
cd <path_to_directory_containing_files> && for file in *<file_type>; do mv "$file" "${file:<number_of_leading_characters_to_remove>}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment