The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Find files older than X
Author: Dan 
Date:   08-10-05 05:06

I wanted to delete all the spam/virus logs/emails older than ten days. This does it:

cd /var/virusmails && /usr/bin/find . -ctime +10 -exec rm {} \;

first, go to the right directory.
Then find all files that were created more than 10 days ago. And remove each one.

More examples at http://www.intuitive.com/tyu24/chap19.shtml

--
Webmaster

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org