Last active
December 6, 2016 12:41
-
-
Save teknikqa/2c0b2aee4aa2135467c4af6fb2f30d06 to your computer and use it in GitHub Desktop.
Rename files and all instances of old name within the files
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
brew install rename | |
# Rename all filenames from old_name to new_name | |
rename 's/old_name/new_name/g;' * | |
# Rename all instances of old_name with new_name inside the files in current directory | |
perl -pi -w -e 's/old_name/new_name/g;' * | |
# Just to be safe search for the old_name | |
ag old_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment