LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleting files by date (https://www.linuxquestions.org/questions/linux-newbie-8/deleting-files-by-date-767035/)

Completely Clueless 11-05-2009 06:04 AM

Deleting files by date
 
Hi all,

I had a program run riot and it has created hundreds of spurious files in one directory. Fortunately they are all dated 4th November so are easily identified. What bash command can I use from the console to delete them all? thanks.

ghostdog74 11-05-2009 06:13 AM

use the find command with mtime option. I let you figure out what number to give mtime since after 400+ posts, i believe you are not completely clueless anymore

linuxlover.chaitanya 11-05-2009 06:15 AM

You can use rm command to delete the files. If you want to delete the files with some specific intentions like deleting files older than x days or last accessed on some day you can use find command to find the files and then delete using | xargs.


All times are GMT -5. The time now is 03:44 AM.