Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jolly Roger Newsgroups: comp.sys.mac.system Subject: Re: Being nice to bad software Date: 25 Aug 2016 05:00:16 GMT Lines: 61 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net oKf8IMcB9UwelGDSIhvCNQtkhdFVaP5tJ68/T1+y/EiCbW1VNZ Cancel-Lock: sha1:2lYtTYP0WE1H5Jtd9T80fMT8G4o= sha1:GzzaPm7Up/CJBxk+pQkRDhJlKSo= User-Agent: NewsTap/5.1.8 (iPhone/iPod Touch) Xref: csiph.com comp.sys.mac.system:93950 Siri Cruise wrote: > In article , > Jolly Roger wrote: > >> On 2016-08-24, Siri Cruise wrote: >>> In article , Alan Baker >>> >>> wrote: >>> >>>> On 2016-08-24 2:33 PM, Happy.Hobo wrote: >>>>> On 08-24-2016 14:38, Jolly Roger wrote: >>>>>> Yep. You can also drag and drop the file into the terminal window for >>>>>> the same >>>>>> effect. >>>>> >>>>> You can't drag and drop the output of 'ls' or 'find' into a later >>>>> command without frequently encountering this "non-issue." >>>> >>>> Why would you use those? Explain what you were actually doing, and I'll >>>> be you dollars to donuts that I can do it better. >>> >>> find ~/Library -iname '*flash*' -o -iname '*swf*' 2>/dev/null >>> rm -rf '....' '....' >>> >>> Manually inspecting the found paths so I don't accidentally delete all my >>> flashgordon.savegames folder. Manually inserting the paths into rm -rf is >>> safer >>> from my fingers than rm -ri. >> >> That's incredibly silly. You're doing it wrong. First you run this >> command: >> >> find ~/Library -iname '*flash*' -o -iname '*swf*' 2>/dev/null >> >> Then after you have inspected the output and verified that it is >> satisfactory, you simply add the -exec switch to remove the files: >> >> find ~/Library -iname '*flash*' -o -iname '*swf*' -exec rm -rf {} 2>/dev/null >> >> Simple, and no silly copy and paste needed. Mixing command-line and GUI >> tools is silly when you can handily do everything you want right on the >> command line. Use the right tool for the job. > > So what you're saying is I either remove Adbobe flash and Flash Gordon or I > remove neither. > > Not exactly the point of the exercise. Nope. I'll repeat: first you should refine the find command to output only the files you actually want. If it's finding files you don't want, you need to refine the command some more - perhaps by adding -not -name 'Gotdon', or some other way. Once it finds only the files you want, you add the additional -delete switch. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR