apropos: Command-Line Power Tool
Novell Cool Solutions: Tip
By Scott M. Morris
Digg This -
Posted: 20 Dec 2005
- SUSE Linux 10
- SUSE Linux Professional 9.2 - 9.3
- Novell Linux Desktop 9
- SUSE Linux Enterprise Server 9
Linux is so diverse and useful. This is especially true if you are an ace at the command line. For those of us who are not, there are some really great helper commands. One of the nice ones is called apropos, which I would like to quickly introduce.
From the man page for this cool command, we learn that "apropos searches a set of database files containing short descriptions of system commands for key-words and displays the result on the standard output." OK, so... huh?
This just means that if you can't quite remember a command, but you know a part of the command, or a word in its description, you can apropos it. Let's look at a quick example.
Let's say I wanted to compress a file. I know I want to "zip" it, but I can't remember the exact command. I'm also pretty sure that "zip" might be in the description. So, at a terminal, I just type in "apropos zip" and press [ENTER]. Here's an example:
[scott@work:~]$ apropos zip Archive::Zip (3pm) - Provide an interface to ZIP archive files Archive::Zip::FAQ (3pm) - Answers to a few frequently asked questions about Archive::Zip bunzip2 [bzip2] (1) - a block-sorting file compressor, v1.0.3 bzcat [bzip2] (1) - decompresses files to stdout bzcmp [bzdiff] (1) - compare bzip2 compressed files bzdiff (1) - compare bzip2 compressed files bzegrep [bzgrep] (1) - search possibly bzip2 compressed files for a regular expression bzfgrep [bzgrep] (1) - search possibly bzip2 compressed files for a regular expression bzgrep (1) - search possibly bzip2 compressed files for a regular expression bzip2 (1) - a block-sorting file compressor, v1.0.3 bzip2recover [bzip2] (1) - recovers data from damaged bzip2 files bzless [bzmore] (1) - file perusal filter for crt viewing of bzip2 compressed text bzmore (1) - file perusal filter for crt viewing of bzip2 compressed text funzip (1) - filter for extracting from a ZIP archive in a pipe gunzip [gzip] (1) - compress or expand files gzip (1) - compress or expand files unzip (1) - list, test and extract compressed files in a ZIP archive unzipsfx (1) - self-extracting stub for prepending to ZIP archives zcat [gzip] (1) - compress or expand files zforce (1) - force a '.gz' extension on all gzip files zip (1) - package and compress (archive) files zipcloak [zip] (1) - package and compress (archive) files zipgrep (1) - search files in a ZIP archive for lines matching a pattern zipinfo (1) - list detailed information about a ZIP archive zipnote [zip] (1) - package and compress (archive) files zipsplit [zip] (1) - package and compress (archive) files [scott@work:~]$
It shows me a list of all the commands that contain 'zip' in them or in their description. This way, I can look through them and see if I can locate the command I'm trying to use to zip something up. apropos is a neat command that actually helps you learn the command line better. I recommend it if you want to become an expert at the terminal.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com