LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 70
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
ghostdog74
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
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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