[Discuss] Command line question

Daniel M. German dmgerman at uvic.ca
Wed Jul 26 18:17:15 PDT 2006




 Adam> David Bronaugh wrote:
 >> Deryk Barker wrote:
 >>> Adam Parkin wrote:
 >>> 
 >>>> David Bronaugh wrote:
 >>>> 
 >>>>>> What's a quick way of doing this on the command line?
 >>>>> 
 >>>>> Hmm, if my other mail got through, this is a correction
 >>>> 
 >>> See what I mean about find's syntax? :-)
 >> Actually, I was being sloppy with rm...

 Adam> I suppose I was being a bit gullible just taking the command you gave me 
 Adam> and running it without taking a close look at it.  For all I knew you 
 Adam> might've been a malicious hAX0r type and fed me something like:

 Adam> find / -name CVS -exec rm -rf {} \;

 Adam> and then I would've lost my repository. =8-p

that is exactly why I tend to run 

find / -name CVS 

and if satisfied, then I run it with rm. or even better, I pipe it to
xargs rm -rf

I always get worried with using exec rm -rf (mainly because of the
last -f).

dmg



--
Daniel M. German                  "None but those who have experienced
   Mary Shelley (Frankenstein) ->  them can conceive of the enticements of science."
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 


More information about the Discuss mailing list