»
S
I
D
E
B
A
R
«
Rename files in bash
December 19th, 2009 by Andrew McCombe

If you ever need to rename a batch of files using a regex or similar you can use the `rename` command:

# Rename .wav to .mp3
rename -v 's/\.wav/\.mp3/g' *
 
# replace all hyphens in jpgs with a space
rename -v 's/-/ /g' *.jpg


Comments are closed

»  Substance: WordPress   »  Style: Ahren Ahimsa