From owner-freebsd-questions Fri Jul 4 22:48:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA23106 for questions-outgoing; Fri, 4 Jul 1997 22:48:20 -0700 (PDT) Received: from nexgen.hiwaay.net (tnt1-214.HiWAAY.net [208.147.147.214]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA23099 for ; Fri, 4 Jul 1997 22:48:17 -0700 (PDT) Received: from nexgen (localhost [127.0.0.1]) by nexgen.hiwaay.net (8.8.5/8.8.4) with ESMTP id AAA11695; Sat, 5 Jul 1997 00:47:56 -0500 (CDT) Message-Id: <199707050547.AAA11695@nexgen.hiwaay.net> X-Mailer: exmh version 2.0gamma 1/27/96 To: guelph@tpts5.seed.net.tw cc: freebsd-questions@FreeBSD.ORG From: dkelly@hiwaay.net Subject: Re: Help In-reply-to: Message from Gordon Wang of "Sat, 05 Jul 1997 13:16:45 +0800." <33BDD8BD.4FB9@tpts5.seed.net.tw> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 05 Jul 1997 00:47:49 -0500 Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk guelph@tpts5.seed.net.tw asks: > > Dear Sir > What is the equivalent command in FreeBSD to the MS-Dos command > " dir filename /s "(search the file in all the file system)? I don't do DOS, but from your description I'd say: % find / -name filename -print See the manpage for find for more details but in summary the above starts at / an looks for a file named "filename" and prints what if finds. The -print is optional in SGI's (starting with Irix 6.3) and FreeBSD's find but not in other Unix find's. One furthing thing, if you quote "file*" you can use wildcards to match the filename. You've got to quote the expression else it will expand in your current directory, and thats probably not what you really want. Another fun way to use find: % find / -name "file*" -exec ls -l "{}" \; I won't explain that one. For more examples of find, see /etc/daily and /etc/weekly. -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system.