Introduction to Command Options and parameters in CentOS

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.