Shell Script Syntax
I need to write a shell script that will run at the beginning of a new day. Depending on a few factors, it will run between 12:00 A.M. and 12:03 A.M. I have the script written, except for the last line. I need to delete all files that were not created on today's date. I tried this line:
find ./ -type f -mtime +0 -mtime -2 -exec ls -l {} \; -exec rm -v {} \;
This deletes all files that were created more than 24 hours ago.
I want to delete all files in the directory that were created prior to 12:00 A.M. What is the syntax to accomplish this?
Thank you
|