linuxjunk
Sunday, September 27, 2009
Rename files matching given spec to incrementing filenames
This one liner renames all files starting with shred_ to shred_0.tif, shred_1.tif etc.
ls shred_* | awk 'BEGIN{n=0;}{print "mv " $0 " shred_" n ".tif"; n++;}' | sh
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment