比如說今天遇到一個問題, 想要應用一下net use這條命令, google一下, 發現下面的命令用法的說明:
net use [{DEVICE | *}] [\\COMPUTER\SHARE[\VOL]] [{PASSWORD | *}]] [/USER:[DOMAIN\]USER] [/USER:[DOTTEDDOMAIN\]USER] [/USER: [USER@DOTTEDDOMAIN] [/SAVECRED] [/SMARTCARD] [{/DELETE | /PERSISTENT:{yes | no}}]
net use [DEVICE [/HOME[{PASSWORD | *}] [/DELETE:{yes | no}]]
net use [/PERSISTENT:{yes | no}]
然後會給出一些例子, 一般就看看舉出的例子就大致知道了命令應該如何應用. 但是處於積累的目的, 我們還是有必要搞清楚這裡的用來說明命令使用的符號都代表什麼意思.
要點如下:
- 方括弧中的元素是可選的.
- 三個點說明該元素可以重複任意多次的.
- 豎線說明被它分隔的元素, 必須選一個.
- 前傾斜杠(slash)跟隨的是一個開關.
找到說明這個問題的英文文章如下:
Syntax Notes
==================
To be functional, each DOS command must be entered in a particular way. This command entry structure is known as the command's "syntax." The syntax "notation" is a way to reproduce the command syntax in print. Think of syntax as pronouncing the command or language, but in writing.
For example, you can determine the items that are optional, by looking for information that is printed inside square brackets. The notation [d:], for example, indicates an optional drive designation. The command syntax, on the other hand, is how you enter the command to make it work.
Command Syntax Elements
------------------------
1. Command Name
The DOS command name is the name you enter to start the DOS program (a few of the DOS commands can be entered using shortcut names). The DOS command name is always entered first. In this book, the command is usually printed in uppercase letters, but you can enter command names as either lowercase or uppercase or a mix of both.
2. Space
Always leave a space after the command name.
3. Drive Designation
The drive designation (abbreviated in this book as "d:") is an option for many DOS commands. However, some commands are not related to disk drives and therefore do not require a drive designation. Whenever you enter a DOS command that deals with disk drives and you are already working in the drive in question, you do not have to enter the drive designator. For example, if you are working in drive A (when the DOS prompt A> is showing at the left side of the screen) and you want to use the DIR command to display a directory listing of that same drive, you do not have to enter the drive designation. If you do not enter a drive designation, DOS always assumes you are referring to the drive you are currently working in (sometimes called the "default" drive).
4. A Colon
When referring to a drive in a DOS command, you must always follow the drive designator with a colon (:) (this is how DOS recognizes it as a drive designation).
5. Pathname
A pathname (path) refers to the path you want DOS to follow in order to act on the DOS command. As described in Chapter 3, it indicates the path from the current directory or subdirectory to the files that are to be acted upon.
6. Filename
A filename is the name of a file stored on disk. As described in Chapter 1, a filename can be of eight or fewer letters or other legal characters.
7. Filename Extension
A filename extension can follow the filename to further identify it. The extension follows a period and can be of three or fewer characters. A filename extension is not required.
8. Switches
Characters shown in a command syntax that are represented by a letter or number and preceded by a forward slash (for example, "/P") are command options (sometimes known as "switches"). Use of these options activate special operations as part of a DOS command's functions.
9. Brackets
Items enclosed in square brackets are optional; in other words, the command will work in its basic form without entering the information contained inside the brackets.
10. Ellipses
Ellipses (...) indicate that an item in a command syntax can be repeated as many times as needed.
11. Vertical Bar
When items are separated by a vertical bar (|), it means that you enter one of the separated items. For example: ON | OFF means that you can enter either ON or OFF, but not both.
原文地址: http://www.dewassoc.com/support/msdos/dos_commands.htm