Descriptions of usr/bin files in OS X
February 26, 2005 7:26 PM   Subscribe

I'm looking for a simple descriptive list of each of the files in the OS X usr/bin/ directory. Something like this but more complete and including the OS X specific apps.

I would think that doing the equivalent of "ls usr/bin | whatis" would do the trick, but when I try the whatis command I get "whatis: no whatis databases in /usr/share/man"
posted by gwint to Computers & Internet (11 answers total)
 
I wrote a script called whatis.q, containing this:

#!/usr/bin/perl

while (<STDIN>) {
chop;
if ($_ ne "") {

print `/usr/bin/whatis $_`;

}
}

Then did "ls /usr/bin/|~/bin/whatis.q>whatis.usr.bin.output" and it worked for me.
posted by sled at 8:37 PM on February 26, 2005


If there's no whatis database, try running /usr/sbin/makewhatis. It's a shell script which builds the whatis database that should have come with the whatis distribution. The location may be different on OS X, so if it's not there you might try looking in /usr/bin/.
posted by thebabelfish at 9:26 AM on February 27, 2005


whatis `\ls -1 /usr/bin`

posted by andrew cooke at 9:34 AM on February 27, 2005


if makewhatis is in /usr/sbin then you need to be root to use it.
posted by andrew cooke at 9:35 AM on February 27, 2005


Response by poster: OK. After doing:

sudo find / -name "makewhatis" -print

it turns out makewhatis is in /usr/libexec

sudo ./makewhatis did the trick.

Thanks for all the tips. Why would a unix system not have a pre-compiled version of whatis? Does it really take up that much disk space or something?
posted by gwint at 10:27 AM on February 27, 2005


On a sidenote... "find / -name {file} -print" can easily be replaced with "locate {file}"
posted by sd at 10:53 AM on February 27, 2005


Response by poster: $ locate makewhatis
locate: no database file /var/db/locate.database.

Doh.
posted by gwint at 11:38 AM on February 27, 2005


from "man locate":

/usr/libexec/locate.updatedb


It's strange that your machine had neither whatis nor locate databases in place.

/etc/weekly is in charge of updating both, and should be automatically run every week.

Maybe your crontab got damaged during an upgrade?
posted by sd at 11:54 AM on February 27, 2005


Best answer: Why would a unix system not have a pre-compiled version of whatis?

locate: no database file /var/db/locate.database.

Both of these are set up to be updated regularly by a cron job. My laptop is asleep at the times when the cron jobs are run, so they never got done automatically either. To make these happen type "periodic weekly" as root. To see what exactly that does, look at /etc/periodic/weekly/500.weekly
posted by advil at 11:59 AM on February 27, 2005


You can also use the freeware utility OnyX to manually run the maintenance scripts.
posted by macrone at 12:18 PM on February 27, 2005


ls /usr/bin | xargs whatis
posted by substrate at 8:38 PM on February 27, 2005


« Older Are they spitting at me?   |   internal aduido recording on cell phones? Newer »
This thread is closed to new comments.