RE: Grep entire file system

  • From: "Jesse, Rich" <Rich.Jesse@xxxxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 12 Aug 2004 17:24:08 -0500

Depending on the OS/utils version, you may wish to include a "-t" in the =
xargs call, or you may not see what file it was found in.

Rich

Rich Jesse                        System/Database Administrator
rich.jesse@xxxxxxxxxxxxxxxxx      QuadTech, Sussex, WI USA


-----Original Message-----
Sent: Thursday, August 12, 2004 4:50 PM
Subject: Re:Grep entire file system


> find ./ -type  f -exec grep -i -l 'sqlplus' {} \;
> ----------------------------------------------
Friends don't let friends use -exec

This is several orders of magnitude faster:

find . -type f -print | xargs grep -i sqlplus


Jared
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: