[NTLUG:Discuss] Removing lots of Files - help.
    Bobby Sanders 
    ssanders at vzinet.com
       
    Sun Apr  6 15:30:50 CDT 2003
    
    
  
--On Sun, 06 Apr 2003 14:53:09 -0500, kbrannen at gte.net said:
  KB> Victor Brilon wrote:
  >> find /full/path/to/dir -name '*~' -exec rm -i {} \;
  >> 
  >> Obviously change the path to be the full path to where you want
  >> to start looking. And get rid of the '-i' if you're feeling brave
  >> and don't want confirmation of every file you nuke :)
  KB> And if you don't want the "-i" and also want it to run faster,
  KB> change it to:
  KB> find /full/path/to/dir -name '*~' -print | xargs rm
Been using Xenix <--> Linux since about '92 (not a full time
administrator) and never used xargs before.  I wish I could recite all
of the Linux commands like I can the Boy Scout law.  :) Thanks a
million.
  KB> and it will run *much* faster than if you use "-exec" in the
  KB> find command. More specifically...  For a small number of files,
  KB> you won't notice a speed difference, but if you have more than
  KB> about 50 files, the speed difference is significant. :-)
  KB> HTH, Kevin
It did.  Thanks again
Bobby
    
    
More information about the Discuss
mailing list