Friday, August 23, 2013

Looking for a command? Use apropos command

If you are on a UNIX terminal and are looking for a command for a task but not sure if there exists one or may be you are looking for an alternative command to the one you know, one way is to google and look for it.

But, sometimes google may be blocked or is not accessible especially when you are on intranet which blocks traffic to the internet. In this situation you may use apropos command, which is available on most UNIX based OS.

For example, if you want to find the commands that deal with "checksum" in one way or the other, you can run the command below. apropos command will give you the list of commands that may be useful to you.

The best part of this command is that you may learn few more commands that you didn't know existed in UNIX.
# apropos checksum

cksum                (1)  - checksum and count the bytes in a file
cksum                (1p)  - write file checksums and sizes
innochecksum         (1)  - offline InnoDB file checksum utility
shasum               (1)  - Print or Check SHA Checksums
sum                  (1)  - checksum and count the blocks in a file
You can test the command here: http://www.compileonline.com/execute_ksh_online.php

No comments: