Date: Wed, 06 Nov 2002 10:09:35 -0800 From: paul beard <pdb2@u.washington.edu> To: questions <questions@freebsd.org> Subject: Re: simple find command Message-ID: <3DC95ADF.1060306@u.washington.edu> References: <200211061124.25334.mbettinger@championelevators.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Bettinger wrote: > -----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 > so maybe someone can help me out here. > > I have a list of files (hundreds) in directory . and need to search through > and delete every file that contains the word foo. If they're all in . and you need not descend into other directories, you can just use grep to find them. Replace ls -l with rm in the example: [/home/paul]:: grep -l foo * | xargs ls -l -- Paul Beard / 8040 27th Ave NE / Seattle WA 98115 / paulbeard [at] mac [ dot] com / 206 529 8400 weblog @ <http://paulbeard.no-ip.org/movabletype/> One reason why George Washington Is held in such veneration: He never blamed his problems On the former Administration. -- George O. Ludcke 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?3DC95ADF.1060306>