Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-05-2009, 06:04 AM   #1
Completely Clueless
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 816

Rep: Reputation: 69
Question 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.
Old 11-05-2009, 06:13 AM   #2
Senior Member
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
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
Old 11-05-2009, 06:15 AM   #3
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting by date a specific range of files nooks12 Linux - Newbie 2 01-08-2008 02:45 PM
Best program for deleting files after than a certain date? hbbtstar Linux - Software 2 06-18-2007 10:38 AM
Deleting files after x days from the latest date file sriramsreedhars Programming 8 03-03-2007 09:30 AM
Deleting data from file by date? mephitic Linux - Newbie 3 09-22-2004 12:33 PM
Script for deleting files based on date MaverickApollo Linux - General 3 02-03-2004 07:54 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration