The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
Google UNIX.COM



Thread: rm command
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 04-14-2008
alan's Avatar
alan alan is offline
Registered User
 

Join Date: Jul 2003
Location: Los Angeles
Posts: 53
Have you tried combining `Find()` and `xargs()`? Do something like....

find -name '*log' -size +1000k| xargs rm *log

This would search for any file that is larger then 1000k and delete them...

In your case, the Find() switch to use should be "-atime n" ; The man page reads" True if the file was accessed n days ago. ".

Good luck.

Last edited by alan; 04-14-2008 at 09:25 AM.
Reply With Quote