Linux commands a lot, but the format itself is almost blank interpretation of the text, all in the form of guessing to write orders, in this online collection of such information are very little and very not comprehensive, want to find the official, also did not find. Write an article according to your own understanding and hope it will be useful to beginners.
?
I. GENERAL format of commands
command [options] [arguments]
?
Command: Commands
options:--words OR-word
Arguments: parameters, sometimes options with parameters.
?
Second, the symbolic meaning in the command format
?
When you view the command help, symbols such as [],<>,|] appear, meaning the following:
[] the expression is optional;
<> represents a variable option, which is typically multiple selection and must be selected.
X|y|z more than one, if added [], optional.
-ABC multiple selection, if added [], optional.
?
Three, the common command format example explanation
?
You can often see the following format for the command format:
1, [--atime-preserve], 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. Command writing such as: TAR-B=10000-CVF com.tar.gz com
4, [-F,--info-script F--new-volume-script F], indicating that there are two simultaneous optional commands,-F F--new-volume-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.
Man manual Syntax format