From owner-ctm-users@FreeBSD.ORG Sun Oct 2 15:55:06 2011 Return-Path: Delivered-To: ctm-users@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D910106564A for ; Sun, 2 Oct 2011 15:55:06 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from tower.berklix.org (tower.berklix.org [83.236.223.114]) by mx1.freebsd.org (Postfix) with ESMTP id B77CD8FC12 for ; Sun, 2 Oct 2011 15:55:05 +0000 (UTC) Received: from mart.js.berklix.net (pD9FBFD99.dip.t-dialin.net [217.251.253.153]) (authenticated bits=0) by tower.berklix.org (8.14.2/8.14.2) with ESMTP id p92FUKJT064356; Sun, 2 Oct 2011 15:30:21 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id p92FUF6W046375; Sun, 2 Oct 2011 17:30:15 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id p92FU4Gc061047; Sun, 2 Oct 2011 15:30:10 GMT (envelope-from jhs@fire.js.berklix.net) Message-Id: <201110021530.p92FU4Gc061047@fire.js.berklix.net> To: "haihq" From: "Julian H. Stacey" Organization: http://www.berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Wed, 21 Sep 2011 11:31:59 +0700." <001201cc7817$68ec2870$3ac47950$@com> Date: Sun, 02 Oct 2011 17:30:03 +0200 Sender: jhs@berklix.com Cc: ctm-users@freebsd.org Subject: Re: find file by content X-BeenThere: ctm-users@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CTM User discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2011 15:55:06 -0000 "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/