Created
February 27, 2020 05:33
-
-
Save michchan/f8f795e2af606c09e23733b1c6213cde to your computer and use it in GitHub Desktop.
Bash Script to Search and Replace Directory 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
find . -type d -name "*NameToReplace*" | while read f; do mv $f $(echo $f | sed "s/NameToReplace/ReplacedName/g"); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment