Find and replace names
Find and replace names matching a pattern
Last update: 2024-04-02
Script that replaces all directories removing 'preffix_' and '_suffix' from dirname
find . -type d -exec sh -c 'mv "$0" "$(echo "$0" | sed -e "s/_suffix//g" -e "s/preffix_//g")"' {} \;