Debian GNU/Linux : Guide to Installation and Usage by John Goerzen;Ossama Othman
page 74 of 298 (24%)
page 74 of 298 (24%)
![]() | ![]() |
|
The Command Line and Man Pages We've already discussed the command line - that is, commands you type after the shell prompt. This section describes the structure of more complicated command lines. A minimal command line contains just a command name, such as whoami. But other things are possible. For example, you might type: man whoami. This command requests the online manual for the whoami program (you may have to press the space bar to scroll through the documentation or press q to quit). A more complicated example is man -k PostScript. This command line has three parts. It begins with the command name, man. Then it has an option or switch, -k, followed by an argument, PostScript. Some people refer to everything except the command name as the parameters of the command. So, options and arguments are both parameters. Options change the behavior of a command, switching on particular features or functionality. They usually have a - before them. The GNU utilities also have ``long forms'' for the options; the long form of -k is -apropos. You can enter man -h or man -help to get a full list of options for the man command. Every command will have its own set of options, though most have -help and -version options. Some commands, such as tar, do not require the ``-'' before their options for historical reasons. Anything that isn't an option and isn't the command name is an argument (in this case, PostScript). Arguments can serve many purposes; most commonly, they are filenames that the command should operate on. In this case, PostScript is the word you want man to search for. In the case of man whoami, the argument was the command you wanted information about. |
|