Timeline for Rename Multiple files and add date before the files
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 7, 2011 at 19:27 | comment | added | frogstarr78 | I'd recommend using for file in file*.gz instead of that "messy" regex. | |
| Oct 7, 2011 at 18:51 | vote | accept | garconcn | ||
| Oct 7, 2011 at 18:50 | comment | added | garconcn | Thank you. I modified a little because I have some other files in same folder and it works perfect now. cdate=$(date +"%Y-%m-%d") shopt -s extglob for file in [a-z 0-9]*.gz ; do mv "$file" "${cdate}_$file" done | |
| Oct 7, 2011 at 18:35 | history | answered | glenn jackman | CC BY-SA 3.0 |