Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hcommand to find recursively files {can be modified for folders too, change -type f}, and renamed them by specfying regex pattern
- find . -type f -maxdepth [depth] -name "[filepattern]" | while read FNAME; do mv "$FNAME" "${FNAME//search/replace}"; done
- example:
- find . -type f -maxdepth 1 -name "domain*.php" | while read FNAME; do mv "$FNAME" "${FNAME//domain/lead}"; done
Add Comment
Please, Sign In to add comment