How to rename some files to new filenames in ascending format.
Fox example.I want to rename the files below like this: test1.png、test2.png.....
-rw-rw-r--. 1 test test 20448 2010-12-08 20:11 2010-12-08-212440_1440x900_scrot.png -rw-rw-r--. 1 test test 29799 2010-12-08 21:25 2010-12-08-212526_369x331_scrot.png -rw-rw-r--. 1 test test 34167 2010-12-08 23:54 2010-12-08-235424_580x328_scrot.png -rw-rw-r--. 1 test test 155202 2010-12-08 23:55 2010-12-08-235511_1440x900_scrot.png Any help will be appreciated! |
Code:
x=0;for i in *.png; do let x++; mv "$i" "test${x}.png"; done Hope this helps |
Thank you!
|
All times are GMT -5. The time now is 11:56 PM. |