From owner-freebsd-questions Tue Feb 19 19:47:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.anu.edu.au (mail.anu.edu.au [150.203.2.7]) by hub.freebsd.org (Postfix) with ESMTP id 943A137B402 for ; Tue, 19 Feb 2002 19:47:00 -0800 (PST) Received: from nucl03.anu.edu.au (nucl03.anu.edu.au [150.203.19.120]) by mail.anu.edu.au (8.9.3/8.9.3) with ESMTP id OAA07947; Wed, 20 Feb 2002 14:46:58 +1100 (EST) Received: (from gjl103@localhost) by nucl03.anu.edu.au (8.11.6/8.11.6) id g1K3kwL51315; Wed, 20 Feb 2002 14:46:58 +1100 (EST) (envelope-from gjl103) Date: Wed, 20 Feb 2002 14:46:58 +1100 From: Greg Lane To: Sean Chittenden Cc: Posthuman , questions@FreeBSD.ORG Subject: Re: file in a system. Message-ID: <20020220144658.A51230@nucl03.anu.edu.au> Reply-To: gregory.lane@anu.edu.au Mail-Followup-To: Sean Chittenden , Posthuman , questions@FreeBSD.ORG References: <000c01c1b9ba$3d41e9b0$0abf7842@posthuman> <20020219192852.F29935@ninja1.internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020219192852.F29935@ninja1.internal>; from sean@chittenden.org on Tue, Feb 19, 2002 at 07:28:52PM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I've been browsing thru the man pages in order to locate "command + > > arguments" on how I can locate a certain file in the system if am not > > sure where it is. I stopped at "wc" "grep" "whereis" but I didn't get > > any results. My question is how can I list all *.log files on my system > > + the path for everyone, regardless of their location. If can give an > > example I will be grateful. Thanks in advance. > > locate '*.log' > > Make sure you locatedb is up to date. A weekly script gets run to > keep the DB in sync, /etc/periodic/weekly/310.updatedb. Feel free to > run this whenever you feel your locate commands are no longer > accurate. -sc > This is true except for one caveat. The locate command will not find ALL files in ALL paths as locate by default runs as user nobody and only sees files in directories for which "nobody" has read access. As root you can use: find / -name "*.log" to find every .log file and its full path. Cheers, Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message