Posted By

ashsa on 02/17/11


Tagged

rename


Versions (?)

bulk rename with 'rename' command on linux


 / Published in: Bash
 

  1. # command: rename <options> 's/<old>/<new>/ <where>
  2.  
  3. # first testing with param -n
  4. rename -n 's/(\w+)\s(.*)\.pdf/$1\.pdf/' *
  5.  
  6. # placeholder $1 is the first group matched, etc
  7.  
  8. # execute with verbose
  9. rename -v 's/(\w+)\s(.*)\.pdf/$1\.pdf/' *

Report this snippet  

You need to login to post a comment.