Andrew Gwozdziewycz on 16 Oct 2008 08:44:58 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] CLI for "find" text string in an unknown file




On Wed, Oct 15, 2008 at 7:53 PM, Dan Widyono <dan@widyono.net> wrote:
> find <directory> -exec grep -l <string> {} \;

Or with only one tool, grep -rl <string> /path/to/top/directory

Or.. using xargs to avoid the crazy syntax of using -exec

find <directory> | xargs grep <string>


--
Andrew Gwozdziewycz
apgwoz@gmail.com
http://www.apgwoz.com  | http://www.photub.com
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug