Quick bash command to mass rename files in numbered sequence

Just a quick bash command to rename all files in a directory in a numbered sequence.

d=0;
for i in *.jpg ;
do
    d=$((d+1));
    mv {"$i","$d.jpg"} ;
done

This is going to rename all jpg files in the directory to 1.jpg, 2.jpg, 3.jpg and so on.

Leave A Comment