Timeline for Remove files older than 5 days in UNIX (date in file name, not timestamp)
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 23, 2015 at 13:51 | comment | added | glenn jackman |
@praneel, shopt -s globstar nullglob; for f in **/ABC...
|
|
| Apr 23, 2015 at 13:48 | comment | added | praneel | Works like a charm for all files under a given directory. How about recursive? | |
| May 8, 2012 at 13:05 | comment | added | glenn jackman |
If Tcl is installed: four_days=$(echo "puts [clock format [clock scan {4 days ago}] -format %Y%m%d]" | tclsh)
|
|
| May 8, 2012 at 8:47 | comment | added | Bram | Question remains: what commands do you have available to get the current date? | |
| May 8, 2012 at 8:28 | history | edited | jw013 | CC BY-SA 3.0 |
edited body
|
| May 8, 2012 at 7:14 | comment | added | Nalu | With help of uname -a got the following info: "SunOS badap01t 5.10 Generic_141444-09 sun4u sparc SUNW,SPARC-Enterprise" | |
| May 8, 2012 at 6:30 | comment | added | Mat | @Naren: what OS are you on? If you don't have GNU date, we need to know what you do have. | |
| May 8, 2012 at 6:04 | comment | added | Nalu | GNU date commands not working.. :( Any other way to get date which is 5 days before? | |
| May 7, 2012 at 17:23 | history | answered | glenn jackman | CC BY-SA 3.0 |