If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > want to remove the files which are 4 months old? how to do it?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-04, 21:02
calyan calyan is offline
Registered User
 
Join Date: Jan 2004
Posts: 28
want to remove the files which are 4 months old? how to do it?

want to remove the files which are 4 months old? how to do it?
Reply With Quote
  #2 (permalink)  
Old 01-07-04, 22:14
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,454
Re: want to remove the files which are 4 months old? how to do it?

Quote:
Originally posted by calyan
want to remove the files which are 4 months old? how to do it?
find /dir_where_the_files_are -type f -mtime +120 -print -exec rm -f '{}' \;

will delete the files that are 120 days old
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On