I. General format of Commandscommand [option] ... [Argument]...command [Options] [arguments]
Specific Description:
1. Command: Indicates the name of the order, such as LS
2. Option: Defines the execution characteristics of the command, which can have two options:
- Long options: Use--boot, followed by complete words, such as--help
- Short options: With-boot, followed by a single character, such as-a
(1) Multiple short options can be combined, for example:-h-l-A = =-hla, but the long option can not be combined, such as--help can not be followed by another word.
(2) option can also have its own parameters, note: Between options and options, between the options and parameters, parameters and parameters must have a space between!
3. Argument: The object that describes the function of the command, as in the above example,/etc is the object that the LS command acts on.
Second, the symbolic meaning in the command format
In Linux, the symbols used for the options and parameters of the command also have a corresponding meaning:
[]: Indicates that the contents of the box are optional.
<>: Indicates that the content inside the angle brackets must be provided.
A|b: Two Select one, or select one more.
... : The preceding content can be repeated multiple times.
three, the common command format example explanationFor command formats, you can often see the following format: 1, [--atime-preserve], which represents an optional option. 2, [-B,--read-full-records], indicating an optional option, abbreviated to-B, the complete wording is--read-full-records, both in use when only one choice, their functions are exactly the same. Generally with "-" the beginning of the options are shorthand, "-" The beginning of the command is the complete wording, and, the general choice has a shorthand, a complete writing, shorthand written in front, complete written in the back, the middle with a comma split. 3, [-B,--blocking-factor N], represents an optional option, abbreviated to-B N, the complete notation is--blocking-factor n,n represents this parameter requires a value, in the detailed description can be seen. Of course, the option can take parameters, or without parameters, most of the options are without parameters, equivalent to the control switch. The command is written such as: TAR-B=10000-CVF com.tar.gz COM4, [-F,--info-script F--new-volume-script F], which indicates that there are two optional commands that exist simultaneously,-F f--new-volu Me-script F, two options must appear at the same time, where the following options are not abbreviated. 5, [-Z,--gzip,--gunzip,--ungzip], represents an optional option, it has a variety of ways, in addition to-Z, the other is its full wording. 6, [-[0-7][LMH]], represents an optional option for nesting, and 0-7 means taking a value from 0 to 7.
References
Http://lavasoft.blog.51cto.com/62575/533131/http://jingyan.baidu.com/article/49ad8bce71f9305835d8fa4e.html
Linux command syntax format