Some friends cannot tell the concepts of "options" and "Parameters" when learning Linux commands, including some Windows commands, you cannot understand the options and parameter formats of Linux commands. This article briefly introduces the differences between the two.
After logging on to Linux, we can enter the command after the # Or $ symbol. Sometimes, the command is followed by "options" or "Parameters ). In Linux, the command format is:
Command [options] [arguments] // brackets indicate that they are optional, that is, some commands do not require options or parameters, but some commands require multiple options or parameters during running.
Options:
The option is to adjust the command execution behavior, that is, different options determine the command display result is different.
Options include long options and short options.
Short options: such as-h,-l, and-s.
L short options are all guided by '-'. When there are multiple short options, the options are separated by spaces.
L some short options of commands can be combined, for example,-l-h can be combined into-lh
L some short options of some commands can be without-, which is usually called BSD-style options, such as ps aux
L some short options require parameters of the option, such as-L 512 M.
Long Options: such as -- help and -- list.
L long faces are all complete words
L long options cannot be combined
L if a parameter is required, the parameter of the long option usually needs to be '=', for example, -- size = 1G
Parameter arguments:
A parameter refers to the object to which a command is executed.
For example, if the ls command is not added, the current directory is displayed. You can also add parameters, such as ls/dev, and the output result is the/dev directory.
The preceding section briefly describes the differences between options and parameters. However, we need to learn more about the options and parameters of a specific Linux Command or view the help of Linux.
This article is from the "Learn Linux" blog, please be sure to keep this source http://zhangqingli.blog.51cto.com/796670/1317740