How could I rename the files in a batch so that the file names themselves would contain the date? Eg. file-name.txt --> file-name_date.txt I have many files I'd like to rename.
Something on the lines of "mv file-name.txt file-name`date`. txt.
When you enclose a command in a pair of ` (that's the key to the left of the number 1) the results of the command are used. You'd use the date format you need. For example date +%jreturns the day of the year.
I think it's not that simple. You have to retrieve the file's ctime or mtime and use that value in the filename. Using `date` command doesn't retrieve the file's mtime or ctime. Maybe some awk or sed command could be used. IG ________________________________________________________________ Harry Potter és a Félvér Herceg! Garantált szállítás a megjelenés napján! (február 10. ) Jegyezze elő most! http://www.bookline.hu/control/news?newsid=322&affiliate=frehp6kar1482