Advertisement
theitd

Bash batch rename - trim

Mar 3rd, 2017
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.15 KB | None | 0 0
  1. # Bash - batch rename, remove everything after a ' ' space
  2. find . -type f -name "* *" -exec bash -c 'f="$1"; s="${f/_ / }"; mv -- "$f" "${s/ *./.}"' _ '{}' \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement