find and searching for specific expression in files
vogelke+unix at pobox.com
Sat May 30 22:58:06 UTC 2009
>> On Sat, 30 May 2009 11:25:12 +0200,
>> "Zbigniew Szalbot" <z.szalbot at 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
More information about the freebsd-questions