The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: FIND command
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 12-06-2005
anil1j anil1j is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 2
FIND command

I am trying to delete all *.log files in current folder. Something like this.
find . -name "*.log" -atime +3 | xargs -i {} rm {}

But the problem is, it deletes *.log files in subdirectories too. I do not want to do that.

My question is "How can I exclude subdirectories in FIND command?"

Please help me!
Thank you