OS X and scheduled tasks

Nov 05, '00 10:09:48PM

Contributed by: robg

When you first install OS X, it won't have all the UNIX commands available. Specifically, "whatis," "man -k," and "locate," all of which are useful for beginners (like me!) will not be there.

Respectively, "whatis" provides a one-line description of a command, "man -k [keyword]" finds all instances of [keyword] in the manual pages, and "locate [fname]" shows you where [fname] is in the directory structure.

A cron (UNIX scheduler program) task needs to be run to create these databases. Unfortunately, it won't run until the end of the first week, assuming you leave your machine on the whole time.

You can force an immediate update, though, by following these steps from a terminal session:

su root
cd /usr/libexec
./makewhatis {-- takes a few seconds to run --}
./locate.updatedb {-- takes up to a few minutes to run --}
exit

The above commands will now work as expected.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20001105220948490