Monday, 28 October, 2002

Newly Discovered Linux Commands:  apropos and whatis

The things they don't tell you about Linux.  Ever since I started working with Linux, I've been hoping for some kind of reference book or site that would tell me what program to use in order to perform some task.  Unix commands are pretty cryptic to the uninitiated, and I find myself fumbling around trying to find the right command to do a particular job.  Today, while exploring my shiny new Linux From Scratch system (see September 7), I ran across the command apropos.  Curious, I looked up the man page, and found what I've been wanting all this time.  apropos (and a companion program, whatis) scan man page descriptions for matches to keywords that you supply on the command line.  whatis will tell you what a particular command does (i.e. "whatis ls" will display the man page description of the ls command).  apropos searches command names and descriptions for keywords.  So "apropos 'list directory'" will display the man page descriptions of all commands that contain the phrase "list directory".  Yes, it's a small victory.  But I'll take what I can get.