Date: Wed, 6 Nov 2002 11:24:19 -0600 From: Matthew Bettinger <mbettinger@championelevators.com> To: <freebsd-questions@freebsd.org> Subject: simple find command Message-ID: <200211061124.25334.mbettinger@championelevators.com>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I am having a bit of trouble with the find command. I am a novice in its= use=20 so maybe someone can help me out here.=20 I have a list of files (hundreds) in directory . and need to search throu= gh=20 and delete every file that contains the word foo. Some of my failed attemps... find . -exec grep -i "foo" -ok -delete {} \; find . -exec grep -l 'foo' -ok -delete {}\; find . -exec grep "foo" {}\; | xargs rm Thanks for any help. Matt=20 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9yVBIXG7+MmNwciURAr1VAKCJWZF87EfqAk8hLdnj/prlZwpVDwCbBrAt Lq+3Zv2Ocd4EmxAXfdhp1OY=3D =3DHNAV -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211061124.25334.mbettinger>