Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Oct 2011 17:30:03 +0200
From:      "Julian H. Stacey" <jhs@berklix.com>
To:        "haihq" <haihq@hurama.com>
Cc:        ctm-users@freebsd.org
Subject:   Re: find file by content 
Message-ID:  <201110021530.p92FU4Gc061047@fire.js.berklix.net>
In-Reply-To: Your message "Wed, 21 Sep 2011 11:31:59 %2B0700." <001201cc7817$68ec2870$3ac47950$@com> 

next in thread | previous in thread | raw e-mail | index | archive | help
"haihq" wrote:
>  
> 
> Hi all
> 
> I use FreeBSD 7.2.   I want find file by content in all computer. 

This & previous question should not be posted to this list,
please see list remit you got when you subscribed.

This question also has nothing specific to FreeBSD,
it would be covered in a standard Unix tutorial or book,
use a search engine to find a Unix tutorial for beginners.

read manual, by typing
	man find

Example solution:
	find / -type f -exec grep -i "your phrase" {} /dev/null \;
of
	find -X / -type f  | xargs grep -l "your phrase"

If you dont understand the above, also type:
	man find
	man xargs


Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
 Reply below, not above;  Indent with "> ";  Cumulative like a play script.
 Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
 Software Freedom Day, Muenchen: 22 Okt  http://berklix.org/sfd/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110021530.p92FU4Gc061047>