Guest User

Untitled

a guest
Sep 19th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. hcommand to find recursively files {can be modified for folders too, change -type f}, and renamed them by specfying regex pattern
  2.  
  3. find . -type f -maxdepth [depth] -name "[filepattern]" | while read FNAME; do mv "$FNAME" "${FNAME//search/replace}"; done
  4.  
  5. example:
  6.  
  7. 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