LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Looking for logic or comand to delete files older than particular time(say 7.59) (https://www.linuxquestions.org/questions/linux-newbie-8/looking-for-logic-or-comand-to-delete-files-older-than-particular-time-say-7-59-a-782977/)

anandpu70 01-18-2010 09:27 AM

Looking for logic or comand to delete files older than particular time(say 7.59)
 
Hi All,

I have particular requirement like deleting the files older than 17th Jan before 7.59am ( Its very particular about the time). I can delete particular date older files but how do i get to delete older than particular time. If any one has any logic or command to do this in Korn shell please let me know.

-Thanks in advance.
Anand.

Skaperen 01-18-2010 10:19 AM

Code:

find /tmp ! -newermt '2010-01-17 07:59:00' -exec rm -fv '{}' ';'


All times are GMT -5. The time now is 12:22 PM.