Regarding the route command, it is a little intimidating, but take it apart and analyze it. First, realize that text not in any sort of special punctuation isrequired.Anything in square brackets ( [ ] ) isoptional.Any text in bold is literal (must be typed in exactly that way- sort of - it'll make sense in a second). So let me copy from the man page on my FC4 system:
黑体部分是一定要按原样填上去的,非黑体部分,如familiy,target等要用适当参数去代替的
Code:
route [
-CFvnee]
route [
-v] [
-A family]
add [
-net|
-host] target [
netmask Nm] [
gw Gw] [
metric N] [
mss M] [
window W] [
irtt I] [
reject] [
mod] [
dyn] [
reinstate] [[
dev] If]
route [
-V] [
--version] [
-h] [
--help
Ok, the first line:
Code:
route [-CFvnee]
Second line:
Code:
route [
-v] [
-A family]
add [
-net|
-host] target [
netmask Nm] [
gw Gw] [
metric N] [
mss M] [
window W] [
irtt I] [
reject] [
mod] [
dyn] [
reinstate] [[
dev] If]
So what's this: [-net|-host](只能选一个,或者都不选)
That says you can have either "-net" on the command line or "-host" but you cannot have both. You can omit them both entirely, but both cannot be present on the command line at the same time.
Now, you'll also notice "target" is not in bold. That's because you have toreplace it with the appropriate value to achieve whatever task you're trying to accomplish. Again, if it's in bold, it's usually literal text. If not, thenit means it's a user-supplied data/parameter/argument.
All the other stuff is pretty similar. Take this guy: [netmask Nm]//如果在命令行中加了netmask,则其后面一定要接一个具体的掩码值(NM)
That says if you supply the netmask keyword on the command line, you are obligated to include Nm, which would be the user-supplied value for the netmask.Both pieces are enclosed by the square brackets, meaning they are optional. If you include it though, you need to provide both the keyword and the associated value; youcannot give one and not the other.
There is one last awkward looking one: [[dev] If](两个层次的可选项)
What's with the nested brackets? That's just saying there are actually two layers of optional text. The command does not need to specify either of these options. If it does, the command can specify just the If part (omittingdev because it's inside nested square brackets). Or the command can specify both pieces.
Third line:
Code:
route [
-v] [
-A family]
del [
-net|
-host] target [
gw Gw] [
netmask Nm] [
metric N] [[
dev] If]
I won't go over this in much detail because it's very similar to the previous line. The difference to notice is that "add" has been replaced with "del". This form of the command would delete a route from the table. Just as with the add form of the command before, there are special option that the command will recognize when deleting a route. You should notice that delete doesn't accept the same set of options that add does. They both share options, but the del version of the command does not support all of the options add does.
Fourth line:
Fourth line:
Code:
route [-V] [--version] [-h] [--help]