On 6/29/07, P.V.Anthony <[EMAIL PROTECTED]> wrote:
Hi,

I need to remove a bunch of files that contact a specific word like spam.

To find the files that contain the word "spam" this was used.
# grep -l spam *

Got a list of all the file names. How to remove all these files.

Tried the following and it did not work.

# grep -l spam * | rm

Almost right: grep -l spam * | xargs rm

Once you get to know 'xargs' you start to wonder how you ever survived
without it...

Best regards
Michael Boman

--
IT Security Researcher & Developer
http://proxy.11a.nu | http://securitytinker.com
"It is well known that a vital ingredient of success is not knowing
that what you're attempting can't be done." -- Terry Pratchett

_______________________________________________
Slugnet mailing list
[email protected]
http://www.lugs.org.sg/mailman/listinfo/slugnet

Reply via email to