Skip to content

Instantly share code, notes, and snippets.

@lgallen
Last active January 5, 2018 01:41
Show Gist options
  • Save lgallen/a3ea7645eea496044bd602f129647dab to your computer and use it in GitHub Desktop.
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
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