What The Heck Is That?
- 0
- Add a Comment
- No Related Post
What The Heck Is That?
Linux is full of little mysteries just waiting for your discovery. Sometimes those mysteries are uncovered with a full description, as in man or info. Sometimes they reveal themselves in the which command. Maybe best of all are the answers that come in a single concise line.
The whatis command does exactly that. Where man and info present all possible information on a command, and which clues you into whether a program is in the path, whatis returns a simple one-line description of a program. For example:
whatis ps
returns
ps (1) - report process status
Simple and to the point.
As you’ve probably guessed, you can also send the output of the whatis command to other Linux tools. Let’s take a look at the contents of my /bin directory:
cd /bin; whatis * | more
This is a combination of several commands. [C]hange [d]irectory to /bin, then run whatis on all the files in the directory [*], and send the ouput [|] to the more command. Here, in part, is the result:
| buildhash (1) | - Interactive spelling checking |
| bunzip2 (1) | - a block-sorting file compressor, v1.0 |
| bvedit (1) | - visual editor for binary files |
| bvi (1) | - visual editor for binary files |
| bview (1) | - visual editor for binary files |
| bzcat (1) | - decompresses files to stdout |
| bzcmp (1) | - compare bzip2 compressed files |
See - there’s just no reason not to get to know your Linux system.
