The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-01-2006
kiranherekar kiranherekar is offline
Registered User
 

Join Date: Jan 2006
Posts: 6
Sorry a bit of google helped me to write the following.

#!/bin/bash
/usr/bin/find / -name *.log -ctime +7 -exec /bin/rm -f {} \;
Reply With Quote