The NEXTSTEP/OpenStep FAQ

! to the table of contents
< to the previous section:
> to the next section:


4.12 How can I quickly find a file if I don't know its directory?

searching, files find

The Unix find command on the NeXT has the capability of quickly searching a database of all the files. This database is located in /etc/find.codes and has to be generated periodically. You can automatically generate this database, say twice a week at 3:15 a.m., by adding this line to your file /etc/crontab.local (you might have to create this file).

15 03 * * 2,5 root /usr/lib/find/updatedb > /usr/adm/updatedb.err

After this has run, you can quickly find any file from a terminal by typing find where is a part of the file name you want (it is case-sensitive).

[Carl Edman ] adds:

Find still works under 3.0, but now has to match the entire filename (including the path) for a match to be recognized i.e. where under 2.x you would have find foobar, under 3.0 you have find '*foobar*' (The ' are necessary to prevent the shell from expanding the wildcards itself).

[From: Geert Jan van Oldenborgh ]

I find the following script in /usr/local/bin very handy to bring back the behavior that God Intended find to have:

#!/bin/csh if ( $#argv == 1 ) then /usr/bin/find \*$1\* else set noglob /usr/bin/find $argv[1-] unset noglob endif



This document was converted from LaTeX using Karl Ewald's latex2html.