Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Jul 1997 00:47:49 -0500
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Help 
Message-ID:  <>
In-Reply-To: Message from Gordon Wang <>  of "Sat, 05 Jul 1997 13:16:45 +0800." <> 

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help 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 

David Kelly N4HHE,
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.

Want to link to this message? Use this URL: <>