LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-16-2004, 01:57 AM   #1
hardeep_ubhi
LQ Newbie
 
Registered: Nov 2004
Location: india
Posts: 13

Rep: Reputation: 0
Question 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
 
Old 11-16-2004, 02:07 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

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


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete/move/copy files of specific date imsajjadali Red Hat 26 11-07-2013 11:34 PM
Delete files for a particular changed date recursively? qwertyme Linux - Newbie 5 01-23-2009 10:41 AM
IMAP - delete after certain date paul_mat Linux - Networking 2 08-01-2005 03:31 PM
Delete files based on date stefaandk Linux - General 3 06-17-2005 02:20 AM
bandwidth allocation by user wise and ip wise basbosco Linux - Networking 1 11-12-2003 02:54 AM


All times are GMT -5. The time now is 03:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration