LinuxQuestions.org
Visit Jeremy's Blog.
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, 07:04 AM   #1
Completely Clueless
Member
 
Registered: Mar 2008
Location: Marbella, Spain
Distribution: Many and various...
Posts: 814

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, 07: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, 07:15 AM   #3
linuxlover.chaitanya
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.
 
  


Reply


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 03:45 PM
Best program for deleting files after than a certain date? hbbtstar Linux - Software 2 06-18-2007 11:38 AM
Deleting files after x days from the latest date file sriramsreedhars Programming 8 03-03-2007 10:30 AM
Deleting data from file by date? mephitic Linux - Newbie 3 09-22-2004 01:33 PM
Script for deleting files based on date MaverickApollo Linux - General 3 02-03-2004 08:54 PM


All times are GMT -5. The time now is 08:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration