Delete files in folder before todays date
Hello all,
New here and a nice place you have here, i have a quick question i am use one of you wizzy guys can help me with I currently have a command to backup a directory it will zip the directory and place it where i have told it too, Now what i am after is a command i can run before my code, that will delete and tar.gz files before todays date so i my ideal world :p it would be something like this, delete <'date +%m_%d_%y'.tar so this will delete all the files in this folder before todays date, this make sence.... thanks in advance if anyone is able to help me :-) |
find -daystart -ctime +0 -exec rm -f {} \;
should do it. |
All times are GMT -5. The time now is 03:55 AM. |