Created
April 7, 2021 07:58
-
-
Save sinanm89/4b10091b54ed189a373f40ff9e8a1cf0 to your computer and use it in GitHub Desktop.
find_and_replace_all_files_directories.sh
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
# change all the folders and files' names from "source" to "destination". This will not replace contents | |
source='' destination='' find . -type d -iname '*${source}*' | while read FILE ; do | |
newfile="$(echo ${FILE} |sed -e 's/${source}/${destination}/')" ; | |
mv "${FILE}" "${newfile}" ; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment