Date: Sat, 30 May 2009 18:26:34 -0400 (EDT) From: vogelke+unix@pobox.com (Karl Vogel) To: freebsd-questions@freebsd.org Subject: Re: find and searching for specific expression in files Message-ID: <20090530222634.61E46BECA@kev.msw.wpafb.af.mil> In-Reply-To: <dd6b168d2af9ddbcfc52e5c0397e4d6a.squirrel@relay.lc-words.com> (z.szalbot@lcwords.com)
next in thread | previous in thread | raw e-mail | index | archive | help
>> On Sat, 30 May 2009 11:25:12 +0200,
>> "Zbigniew Szalbot" <z.szalbot@lcwords.com> said:
Z> Can you please give me a hint how to use find to search for a specific
Z> text within files?
People have mentioned using xargs in combination with find, but if
you're dealing with Windows files on a server, be prepared for every
kind of crap character in the filename you can imagine. Use nulls
to delimit the filenames, i.e.:
find . -mtime +7 -print0 | xargs -0 grep -i foo
The GNU versions of find and xargs support the "0" options as well.
--
Karl Vogel I don't speak for the USAF or my company
iPod changed my life.
Earbuds made me look so cool!
Now I am stone deaf. --geek haiku
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090530222634.61E46BECA>
