Board logo

标题: 快速掌握DOS常用命令[原创]  [打印本页]

作者: kickout     时间: 2002-10-31 00:00    标题: 快速掌握DOS常用命令[原创] 

help you to master dos quickly

basic commands:
1. d:          ----change drive
2. dir         ----list file
3. cd          ----come to a directory
4. copy        ----copy a file or many files
5. type        ----show file conment
6. ren         ----rename a file
7. del         ----delete a file
8. cls         ----clear  the screen
9. xcopy       ----copy a group of files in a directory
10.attrib      ----show or change file''s charckter
11.edit        ----a editor for write a file
12.chkdsk      ----check a disk
13.tree        ----list directory tree
14.format      ----format a disk for dos
15.md          ----make a directory
16.rd          ----delete a directory
17.deltree     ----delete a directory with all it''s sub directory
18.time        ----show system time
19.prompt      ----change the prompt


ok! now  base use-way:
1. d:          ----c:>d:a:        ----change to drive a:
2. dir         ----c:>dir[d:][path][filename[.ext]][/p][/w]
    eg:             c:>dir a:    ----list files in disk a
                    c:>dir l*.*  ----list files whose first letter is "l"
                    c:>dir/w/p   ----list files as wide (  5 files in a line)
                                     and page
    ******          c:>dir ,    ----list
    ******          c:>dir/a
3. cd          ----c:>cd [d:][path]
    eg:             c:>cd yln    ----come to directory named as "yln"
                    c:yln>cd..   ----come back pre-directory
                    c:>cd yln\tool   ----come to multiple(deep layer) directory
                    c:yln\tool\cd\..\game   ---- turn to another directory
4. copy        ----c:>copy [d:][path]file1[.ext] [d:][path]file2[.ext][/a][/v]
    eg:             c:yln\tool>copy  qe.exe a:   ----copy qe.exe to sidk a
                    c:yln\wps>copy xue1.wps+xue2.wps xue3.wps
                                    ---- let xue1.wps and xue2.wps 合成 a new
                                         file named as xue3.wps
                    c:yln\wps>copy xue1.wps xue01.wps ---- copy xue1.wps as new
                                                         name
5. type         ----c:>type [d:][path]filename[.ext][|more]
   eg:              c:yln\wps>type hlp.txt|more   ----show hlp.txt when a page
                                                      full then pause and wait
                                                     you press any key continue
6. ren          ----c:>ren [d:][path]file1[.ext] file2[.ext]
   eg:              c:>ren a.bat b.bat  ----a.bat rename to b.bat
7. del          ----c:>del [d:][path]filename[.ext]
   eg:              c:>del c:\yln\wps\xue1.bak  ----del the file named xue1.bak
8. cls          ----c:>cls               ----clear the screen
9. xcopy        ----c:>xcopy [d:][path] [d:][path] [/s][/e]
   eg:              c:yln>xcopy \wps /s/e ----copy the directory "wps" and all
                                               it''s sub-directory enclude empty
                                               sub-directory
10. attrib      ----c:>attrib[+h][-h][+r][-r][+s][-s][+a][-a][d:][path]filename
   eg:              c:yln\wps>attrib  +h +r xue1.wps----set file attrib (hide,readonly)
11. edit        ----c:>edit [d:][path][filename][.ext]
   eg:              c:>edit  \yln\wps\wue3.txt ----edit file wue3.txt
12. chedsk      ----c:>chkdsk [d:]        ----check d:
13. tree        ----c:>tree [d:]           ----show d:''s directory
14. format      ----c:>format [d:]        ----format d:  for dos
15. md          ----c:>md directory-name  ----make a new directory
16. rd          ----c:>rd directory
    eg:             c:>rd yln       ----delete directory named yln
   (the directory that will  be delete MUST be empty.)
17. deltree     ----c:>deltree [d:][directory][/y]
    eg:             c:>deltree yln/y ----delete directory named yln ,and No ask for your affirm       [Very Danger,use it careful]
18. time        ----c:>time    ----ask the system time,and change the time
19. prompt      ----c:>prompt $p$g ----set the prompt in this format:   d:\current-path>

也是俺以前写的,现在翻出来充数的。呵呵。。。



[此贴子已经被Wengier于2003-10-7 22:59:14编辑过]



作者: leslie     时间: 2003-6-21 00:00
怎么没有中文版啊:(
作者: hunome     时间: 2003-6-21 00:00
1. d:          ----change drive                        更换盘符
2. dir         ----list file                                  察看目录和文件
3. cd          ----come to a directory              进入一个目录
4. copy        ----copy a file or many files        复制文件
5. type        ----show file conment               屏幕显示文件内容
6. ren         ----rename a file                        给文件改名
7. del         ----delete a file                          删除文件
8. cls         ----clear  the screen                    清屏
9. xcopy       ----copy a group of files in a directory    copy的增强版,可复制目录和文件 10.attrib      ----show or change file's charckter    显示和改变文件属性
11.edit        ----a editor for write a file           打开文本编辑器
12.chkdsk      ----check a disk                       检查磁盘
13.tree        ----list directory tree                  显示所有目录
14.format      ----format a disk for dos            格式化磁盘
15.md          ----make a directory                  新建目录
16.rd          ----delete a directory                  删除空目录
17.deltree     ----delete a directory with all it's sub directory      删除目录内所有内容
18.time        ----show system time                显示或修改时间
19.prompt      ----change the prompt            改变提示符




作者: 光年     时间: 2003-6-22 00:00
doskey  记录每次启动后使用过的命令,还可以定义宏指令。
mem     查看内存使用情况
MSD      查看电脑配置情况
fdisk      给硬盘分区     
sys        传递系统文件
defrag   整理硬盘碎片
interlnk,intersvr   DOS双机互联
more     管道

这几个也是我常用的命令。
作者: wanghuan     时间: 2003-6-22 00:00
我也是个DOS爱好者但我知道的DOS命令是实在太少了希望你能够帮帮我也希你能够教教我。
作者: leslie     时间: 2003-6-23 00:00
真的学到很多啊
开心:)
作者: k0359     时间: 2003-6-23 00:00
这些dos命令哪里有????
作者: dhtomyygy     时间: 2003-7-27 00:00
给我解围,真好谢了
作者: dzjwzgd     时间: 2003-8-4 00:00
终于找到中文注释了,感谢提供!
作者: kof     时间: 2003-8-4 00:00
我刚刚开始学DOS,有这样的地方,太高兴了!
作者: 欧阳慧仪     时间: 2003-10-7 00:00
不懂英文的该怎么看呀??????
有没有中文的呀?
作者: anfy     时间: 2003-10-10 00:00
good
defrag can not use because it will br hurt the HD
作者: ls25145     时间: 2003-11-15 00:00
请教诸位大侠
我想把我的键盘输入保存为一个文件
键入copy con c:\test.txt回车
然后就可以输入了,在C盘根目录下就多出来一个test.txt文件,内容刚好是我输入的,但我不知道怎么结束输入,还请各位不吝赐教!
作者: zovusazm     时间: 2003-11-17 00:00
半天看不懂.~
作者: 玩玩而已     时间: 2003-11-18 00:00
楼主

这些英文都是你写的吗?
作者: dwtsteven     时间: 2003-11-18 00:00
interlnk,intersvr   DOS双机互联

这个怎么理解?
显示::
'interlnk' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
作者: wen_8018     时间: 2003-11-19 00:00

作者: jokechen     时间: 2003-11-20 00:00
菜鸟在此谢过了!!

作者: ec     时间: 2003-11-20 00:00
在system32文件夹中发现doshelp.hlp文件
★dos命令解释★

@ Copyright (C) 1990-1999 Microsoft Corporation.  All rights reserved.
@ This is the DOS general help file.  It contains a brief
@ description of each command supported by the DOS help command.
@ Type HELP with no arguments to display the text in this file.
@ Lines beginning with @ are comments, and are ignored by HELP.
@ This file may be modified to add new commands.  If the HELP command-name
@ form is to be used, any new commands should support the /? parameter.
@ New commands should start in the first column.  Any extra lines needed
@ for a command description should be preceded by white space.  Commands
@ must be added in alphabetical order.
ASSOC    Displays or modifies file extension associations
AT       Schedules commands and programs to run on a computer.
ATTRIB   Displays or changes file attributes.
BREAK    Sets or clears extended CTRL+C checking.
CACLS    Displays or modifies access control lists (ACLs) of files.
CALL     Calls one batch program from another.
CD       Displays the name of or changes the current directory.
CHCP     Displays or sets the active code page number.
CHDIR    Displays the name of or changes the current directory.
CHKDSK   Checks a disk and displays a status report.
CHKNTFS  Displays or modifies the checking of disk at boot time.
CLS      Clears the screen.
CMD      Starts a new instance of the Windows 2000 command interpreter.
COLOR    Sets the default console foreground and background colors.
COMP     Compares the contents of two files or sets of files.
COMPACT  Displays or alters the compression of files on NTFS partitions.
CONVERT  Converts FAT volumes to NTFS.  You cannot convert the
         current drive.
COPY     Copies one or more files to another location.
DATE     Displays or sets the date.
DEL      Deletes one or more files.
DIR      Displays a list of files and subdirectories in a directory.
DISKCOMP Compares the contents of two floppy disks.
DISKCOPY Copies the contents of one floppy disk to another.
DOSKEY   Edits command lines, recalls Windows 2000 commands, and creates macros.
ECHO     Displays messages, or turns command echoing on or off.
ENDLOCAL Ends localization of environment changes in a batch file.
ERASE    Deletes one or more files.
EXIT     Quits the CMD.EXE program (command interpreter).
FC       Compares two files or sets of files, and displays the differences
         between them.
FIND     Searches for a text string in a file or files.
FINDSTR  Searches for strings in files.
FOR      Runs a specified command for each file in a set of files.
FORMAT   Formats a disk for use with Windows 2000.
FTYPE    Displays or modifies file types used in file extension associations.
GOTO     Directs the Windows 2000 command interpreter to a labeled line in a
         batch program.
GRAFTABL Enables Windows 2000 to display an extended character set in graphics
         mode.
HELP     Provides Help information for Windows 2000 commands.
IF       Performs conditional processing in batch programs.
LABEL    Creates, changes, or deletes the volume label of a disk.
MD       Creates a directory.
MKDIR    Creates a directory.
MODE     Configures a system device.
MORE     Displays output one screen at a time.
MOVE     Moves one or more files from one directory to another directory.
PATH     Displays or sets a search path for executable files.
PAUSE    Suspends processing of a batch file and displays a message.
POPD     Restores the previous value of the current directory saved by PUSHD.
PRINT    Prints a text file.
PROMPT   Changes the Windows 2000 command prompt.
PUSHD    Saves the current directory then changes it.
RD       Removes a directory.
RECOVER  Recovers readable information from a bad or defective disk.
REM      Records comments (remarks) in batch files or CONFIG.SYS.
REN      Renames a file or files.
RENAME   Renames a file or files.
REPLACE  Replaces files.
RMDIR    Removes a directory.
SET      Displays, sets, or removes Windows 2000 environment variables.
SETLOCAL Begins localization of environment changes in a batch file.
SHIFT    Shifts the position of replaceable parameters in batch files.
SORT     Sorts input.
START    Starts a separate window to run a specified program or command.
SUBST    Associates a path with a drive letter.
TIME     Displays or sets the system time.
TITLE    Sets the window title for a CMD.EXE session.
TREE     Graphically displays the directory structure of a drive or path.
TYPE     Displays the contents of a text file.
VER      Displays the Windows 2000 version.
VERIFY   Tells Windows 2000 whether to verify that your files are written
         correctly to a disk.
VOL      Displays a disk volume label and serial number.
XCOPY    Copies files and directory trees.


作者: ymb     时间: 2003-11-21 00:00
在dos里怎么直接进入windows
作者: jk_jzit     时间: 2003-11-22 00:00
请举例子.这样更清楚详实
作者: wise     时间: 2003-11-25 00:00
请问在DOS进了一个目录后又怎样出回来啊
作者: liujun1895     时间: 2003-11-25 00:00
如饥似渴,太好了!
作者: wq45853911     时间: 2004-1-2 00:00
想知道启动后使用过的命令按f7 就行。
要想知道更多的dos命令到google.com 里搜啊 !!多的很!!!
作者: redcat     时间: 2004-1-3 00:00
SETUP 的参数
麻烦提供一下。
作者: 牧羊人     时间: 2004-1-5 00:00
不错不错!
作者: skywindows     时间: 2004-1-5 00:00
d: 转换盘符
cd: 回到上一个目录
dir:察看相关盘符或者根目录文件
dir/as:可以察看系统文件
md:建立一个目录
rd:删除目录,目录要为空。否则不能删除。
copy:复制文件
move:移动文件
del:删除文件
format:格式化盘符,初学者慎用
chkdsk:检测盘符的相关信息。
mem:察看pc机的内存使用
time:察看时间,可以改啊。
date:察看日期,可以改啊。
tree:这是生存树啊。
cls:清屏作用
xcopy:比copy的速度快啊。一般用于拷贝大和多的文件。
edit:进入edit编辑状态
debug:进入debug汇编状态。
基本常用的差不多就这么多吧。

作者: skywindows     时间: 2004-1-5 00:00    标题: 用用这个命令吧!

[face=隶书][/face]
如果要回到windows目录。
可以用cd..这个命令。它是回到上一个目录 。
如果想回到根目录。则用cd\这个命令。

作者: skywindows     时间: 2004-1-5 00:00    标题: [原创][建议]

你可以在dos下面输入以下命令。它会具体介绍的啊。
setup /?
注意了中间有空格啊。
[em17]
作者: caichjian     时间: 2004-1-6 00:00
不错不错

初学者是必须掌握的

想当初我花了多少时间才学到学熟的哟
作者: meluck     时间: 2004-1-9 00:00
好东西
作者: fengxu     时间: 2004-1-9 00:00
HAO A  A  A
作者: 都市孤狼     时间: 2004-1-10 00:00
好是可是我还是不懂啊
作者: zjjwca     时间: 2004-1-10 00:00
本人想知道关于在网络方面的dos命令,ping等包括参数,格式,常见错误!
作者: zsy1234023     时间: 2004-1-10 00:00
谢谢啦,正在学习DOS的基础知识,及时啦!
作者: luochang850     时间: 2004-1-13 00:00
有了中文注释,终于有点收获谢了!!!!!!!!!!!!!!!!

作者: howen7     时间: 2004-1-13 00:00
真是太感谢你们了,但希望懂得多补充点,不懂得多学点,学到的就要发表。。。
这样我们就一起进步了
作者: 天马流星     时间: 2004-1-14 00:00
一切尽在不言中......................................好

作者: iceboy     时间: 2004-1-14 00:00
C:\>d:
D:\>dir
...


...
D:\>cd a
D:\a>dir
...
A.TXT
...
D:\a>copy d:\a\a.txt d:\b
1 file(s) copied
D:\a>cd \b
D:\b>dir
...
A.TXT
...
D:\b>type a.txt
Welcome to learning DOS!
D:\b>ren a.txt b.txt
D:\b>dir
...
B.TXT
...
D:\b>cls
一刹那间, 屏幕上只剩下最上端的 D:\b>

D:\b>xcopy d:\a d:\b /s
...
n file(s) copied
...
D:\b>dir
...
A.TXT
...
D:\b>attrib
A--- A.TXT
ASHR C.TXT
D:\b>attrib -s -h -r c.txt
D:\b>dir
...
A.TXT
C.TXT
...
D:\b>edit c.txt
(进入编辑器, 编辑完毕)
D:\b>type c.txt
How did I fall in love with you!
D:\b>cd\
D:\>md backkup
(打错了, 要删除)
D:\>rd backkup
D:\>md backup
D:\>cd backup
D:\backup>xcopy c:\document
...
n file(s) copied
...
D:\backup>time
Current time: 23:00:00
Enter new time:

D:\backup>deltree c:\*.*
All ... deleted? (Y/N)Y
Deleteing... ^C
(这样速度太慢了点)

D:\backup>time
Current time: 23:50:00
Enter new time:
(都 50 分钟了也, 格式化算了)

D:\backup>format c: /q /s
... (Y/N)y
...
C 盘一切数据都没了

D:\backup>c:
C:\>dir
.
..
COMMAND.COM
C:\>attrib
---- COMMAND.COM
-SHR DRVSPACE.BIN
-SHR MSDOS.SYS
-SHR IO.SYS

作者: luxiaoliang     时间: 2004-1-15 00:00
我想内容不必太记较谁出了,能帮大家就行。谢谢各位了 !
作者: jming523     时间: 2004-1-15 00:00
流泪感激!!!!
作者: zhuwj     时间: 2004-1-16 00:00
感谢!
作者: superlee1117     时间: 2004-1-16 00:00
呵呵,学了不少》
作者: 牲口99988     时间: 2004-1-16 00:00
看得很爽~可能现在有一部分看这个贴子的人都成为高手了吧? 作为鼓励~顶!!
作者: 牲口99988     时间: 2004-1-16 00:00
文章好是好 不过英文水平一般 语法错误一堆 我不会让人打吧?
作者: iceboy     时间: 2004-1-17 00:00
错误:

cd      change directory
copy    copy files
type    display a file
xcopy   extended copy
attrib  edit files' attribute
edit    edit files
format  wipe a disk

作者: 歪歪     时间: 2004-3-18 00:00
非常感谢