windows与DOS常用命令集合

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

What is “DOS”

4
The Windows CLI commands are sometimes referred to as "DOS" commands.

DOS was the name of the operating system that predated Windows (it stands for Disk Operating System).


dir [/w][/s][/?][/od][/o-d][/oe][/oe] etc.
cd md rd [/s][/q] move copy xcopy [/s][/e] del / erase (these are synonyms) ren type tree [/f][/a] cls ver fc find

wk.baidu.com
DOS Commands

7
Basic DOS commands


File and folder paths


help help <command name>
dot (i.e. .)
dot dot (i.e. ..) full path (AKA absolute path) relative path


The following terms will be used interchangeably

Why should you use the command line interface (i.e. DOS commands)?

6
Many windows users will never have a need for the DOS commands DOS commands are useful or required for many administrative or programming tasks For example, using DOS commands one can write programs to automate many administrative tasks.
The only way to control DOS was to use these commands The commands in the modern Windows Command Line interface are very similar to the original DOS commands, but there are some differences and some completely new commands.

c:\> help | more

The vertical bar symbol (also called a pipe symbol) is located on the keyboard above the backslash ( \ ) character. On the keyboard it looks like a vertical line with a break in the middle`
Output of help command
Output of "help" command is very long and scrolls of the screen.
15
Use the scrollbar to see the rest of the text
help <command>

cd, md, rd, rd /s, rd /s/q type copy, del
What the Windows CLI can do

3
For example you can use the windows CLI to



start a program create a folder remove a folder copy a file remove a file rename a file etc.

Output of help dir command
17
| MORE
| more

18
To view a lot of output, instead of using the scroll bar, you can force the output of most commands to be displayed one screen at a time. Type the command followed by "| more" (without the quotes), for example:
13
THE HELP COMMAND
help command

14
Type "help" follwed by the ENTER key to get a list of the valid commands
(output of the "help" command is shown on the following slides)
Ctrl-C soon)
Using “| more” with other commands

20
You can add “| more” (without the quotes) to the end of most commands to have the output of that command displayed one page at a time. For example, we will learn about both the “dir” and “type” commands later, both of which can be combined with “| more”. The following are both legal: dir | more type myfile.txt | more (for this to work, there must be a file named myfile.txt)


10
THE COMMAND PROMPT WINDOW
Starting the command prompt window

11
To start a command window from "Windows -Home" choose the following menu choice from the start menu:
start | All Programs | Accessories | Command Prompt
The prompt

12
The "c:\>" in the picture is called the "prompt"
(your prompt may look slightly different, such as "d:\>", "c:\somefolder>" or something similar - we'll explain later).
The prompt is automatically displayed by the computer.
You type your commands after the prompt.
In order for a command you typed to do anything, you must press the "ENTER" key. Commands may be entered either in UPPERCASE, lowercase.or MiXeDcAsE

8
dir
DIR dIr
DIr
dIR
More conventions

9
This presentation will use the following conventions when describing the commands:

If a part of a command is optional it will be shown in square brackets. For example the following command is used to get help about the DOS commands. help [<command name>] The description above shows that you can type the word “help” alone or type the word “help” followed by the name of a specific DOS command. If you type the word “help” alone you will see a list of all the DOS commands and a short description of what each command is used for. Example (don’t forget to press the ENTER key): help You can also type the word “help” followed by the name of a specific DOS command to get more extensive help on that particular command. Example (don’t forget to press the ENTER key): help dir
output of "help | more"

19


When you use "| more", the output from the command is displayed one screenfull at a time Below is the output of the command "help | more" Press the spacebar to see the next screenfull of output. Press the ENTER key to see the next line of output. To quit seeing the output type "q" (for quit) or Ctrl-C (I’ll explain more about
1
Windows Command Line Interface (AKA DOS commands)
PREPARE BY YW
Agenda

2
help, help dir dir, dir /w, dir /? fullpath, relative path, dot dot, dot


16
To get detailed help about a specific command type the word "help" (without the quotes) followed by the name of the command. For example to get detailed help about the "dir" command, type the following: help dir
Case In-sensitive
DOS commands are case in-sensitive. This means that you can type the commands in either UPPER CASE, lower case OR a mixture of uPpEr AnD lOwEr CaSe. For example the following are all equivalent ways of typing the “dir” command


CLI vs. DOS

5
Terminology

Even though it's not totally accurate to call the Windows CLI commands "DOS" commands, we will continue to use that term since many people use that term. Sometimes we will simply use the term “DOS” without the word commands. Windows CLI DOS commands DOS
相关文档
最新文档