LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   delete files date wise (https://www.linuxquestions.org/questions/linux-general-1/delete-files-date-wise-255421/)

hardeep_ubhi 11-16-2004 01:57 AM

delete files date wise
 
how can i delete/remove files in linux using rm command data wise.eg i want to remove all files created before 25 oct 04 . thanx

ToniT 11-16-2004 02:07 AM

see: "man find"

eg.
Code:

find -ctime +10 -exec echo rm '{}' ';'
Prints lines: "rm foo", where foo is a file that is created 10 days ago
or before that. (Take the "echo" word away to actually run the command instead of just printing it).


All times are GMT -5. The time now is 01:29 AM.