Command line parameters
As a command line parameter (also command-line switches or flags additional to) parameters to the command in a command line referred to. They are separated from the command and from each other by separators - usually a space ( ASCII code 32
) as a space - and they always follow the command. They are divided into options and arguments.
Options
Options are introduced with one or two hyphens on Unix-like systems , with a slash in the DOS world. They modify the effect of a command. For example, the option -l
in the call results in the command output becoming more detailed (longer). Most commands offer a uniform parameter that shows all possible options for the respective command. This is under Unix or , under PC-compatible DOS and Windows it is or . Several simultaneous options may be combined for some commands, for example, can also be specified as under Windows .
ls -l
ls
-h
--h
/?
/h
dir /s /p
dir /sp
Arguments
Arguments are names of files , directories , users or similar objects to which the command is to be applied. The call
ls /usr/bin
for example, lists the contents of the directory /usr/bin
on Linux . A command can require several arguments, such as the copy command, for which the source and target files must be specified.
parameter
Options and arguments together form the parameters with which a command is called. These also occur together, although the order must sometimes be observed. Such details can be found in the description of the respective command.
In some multi-user systems , command line parameters are visible to other users so that, for example, passwords should not be passed to a program in this way.