Skip to content

Instantly share code, notes, and snippets.

@lajlev
Created April 12, 2013 00:22
Show Gist options
  • Save lajlev/5368288 to your computer and use it in GitHub Desktop.
Save lajlev/5368288 to your computer and use it in GitHub Desktop.
Multiple rename files in terminal
num=0
for j in *.*
do
mv "$j" `printf "fb.%01d.jpg" $num`
num=`echo "$num + 1" | bc`
done
#set zeros on %01d
#You can set filename instead of *.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment