一、DIR 命令的格式:
dir ]
(1)dir /a:attrib 缺省包含所有文件(系统文件.隐含文件)
attrib只显示隐含文件或非隐含文件.
只显示只读文件或非只读文件
只显示系统文件或非系统文件
只显示要归档文件或非归档文件
(2)/osorted:缺省完全按字母顺序,子目录显示在文件之前
/o:按字母顺序或按文件名顺序/反向显示
:按扩展名字母顺序/反向显示
:按时间顺序/反向显示
:按大小从大到小或/反向显示
:按子目录先于文件或文件先于子目录
(3)/s 参数:对当前目录及其子目录中所有文件进行列表
列名ir /s/a/o:n c:\>PRN
将c盘上的所有子目录和文件按隶属关系并根据子目录和文件字母顺序打印输出
(4)/B 参数:将只显示文件名与扩展名
(5)/L 参数:将全部用小写字母对文件或子目录进行列表
训练:
dir /a 列当前目录所有文件(含隐含及系统文件)
dir /ah 列隐含文件(包含子目录(隐含的) dir /a-h
dir /as 列系统文件 dir /a-s
dir /ad 列子目录 dir /a-d
dir /o 按字母顺序
dir /B 只显示文件名与扩展名
二、attrib
缺省 attrib name 显示文件的(文件)属性
attrib io.sys (或子目录)
shr c:\ io.sys 指定为系统(s) 隐含(h) 只读(r)文件
也可以attrib *.sys 显示扩展名为sys的文件属性
参数 将文件属性设置或解除 只读属性
将文件属性设置或解除 归档属性
将文件属性设置或解除 隐含属性 (尤其对子目录也起作用)
/s 参数 将当前及当前子目录下的所有文件均起作用
可以用来查找文件
例子:
attrib news86 列news86的文档属性
attrib +r report.txt 设置为只读 attrib -s -h record.txt
attrib +a a:*.*
attrib -a a:*.bak
xcopy a: b: /a 将A盘上的所有标志为"归档"属性的文件拷到B盘
xcopy a: b: /m 将A盘上的所有文件拷到B盘后并移去归档属性
三、cd 介绍: cd...返回上二级目录 "."代表当前目录 "."代表父目录
cd ..\..返回到上级目录的父目录(祖目录)
cd A:\ 将A盘的当前目录改为根目录
cd A:\xx 将A盘的当前目录改为子目录xx下
cd ..\98 先返回父目录,再进入父目录下的98子目录
cd ..返回到父目录
cd\98 进入根目录下的98子目录
四、copy
copy /y 不加提示,对所有文件加以覆盖
/-y 加以提示,对所有文件 (yes或no提问 )
/v 拷贝以后加以校验
/B 按二进制进行显示
copy w1.wps con/b 可以将wps文件在屏幕上显示,而不必进入wps状态
copy ..\98 将父目录下的98子目录下的所有文件全拷到当前子目录
copy .\97 当当前目录下的97子目录下文件全部拷到当前目录
copy . c:\ 将当前目录下的所有文件拷到c盘根目录
. 意味着 *.* 文件
copy nul a.abc 将a.abc 文件清空(文件长度改为0)
copy 文件名+con 向文本文件中追加命令或内容
copy con 文件名 创建文本文件(F6存盘退出)
copy con prn 检测打印机的开关
五、xcopy命令
xcopy
xcopy xcopy a:b:\ /d:08/18/98/s/v 拷贝98.08.18年后的文件
xcopy 提示创建子目录
xcopy 连带子目录一起拷贝. 注意:若目标盘上不存在此子目录,而在目标
盘的结束符又不以"\"为结束,则将提示:
does destination specify a file name or directory name on the target
?
在目标盘上创建文件还是创建子目录 ?应选择d键
xcopy 带较验
*1) xcopy 不拷贝系统和隐含文件,应先予以修改属性再拷贝
xcopy 覆盖时是否有提示, /y 不带提示
若省略目标盘或子目录名,则拷贝到当前目录下
六、 del /p
加/p 可以在删除前是否提示
如del后加子目录名,则将子目录下所有文件(隐含.系统.只读文件除外)全删除,
加/p则可以确认.
七、undelete /au
不加提示地将所有满足条件的文件恢复(能够恢复的),并将首字母置成"#",若已
存在,则按"# % & 0 1 2-9 a-z"顺序加上.
如:undelete *.dbf/au 将扩展名为"dbf"的文件全恢复,并以"#"开头,作为文件
名, /list 仅列出可恢复的文件,而不恢复
undelete /load 将undelete装入内存
/unload 将undelete卸出内存
/s对指定驱动器进行监测管理
undelete/sc
将 undelete驻留内存,?并创建一个隐含的sentry 子目录对c盘删除的文件进行
管理 undelete/ds 恢复
相应恢复命令可以用undelete即可完整恢复出文件名(非常完整)
最常用undelete *.*
deltree /y
deltree 删除子目录及文件,尽管有些文件是系统文件或隐含文件
它可以带有通配符,带有通配符时,它将删除符合条件的文件及子目录
如:?undelete *.dbf/au 将扩展名为"dbf"的文件全恢复,并以"#"开头作为文件
名.
/list 仅列出可恢复的文件,而不作恢复操作.
undelete/load 将undelete 装入内存.
/unload将undelete 卸出内存.
/s 对指定的驱动器进行监视管理.
undelete/sc 将undelete 驻留内存,并创建一个隐含的sentry子目录对C盘删除
的文件进行管理.相应恢复命令可以用undelete/ds 即可完整恢复出文件名(很完善).
最常用的是undelete *.*
八、deltree /y
deltree 删除子目录及文件,尽管有些文件是系统或隐含的.
它可以带有通配符,这时它将删除符合条件的文件或子目录.
如:存在L1文件,L2子目录,L3文件,L4子目录
deltree L*.* 将删除以上所有的文件和子目录,但在删除前加以确认,若不删除,
可以输入"N".
/y 参数是在删除时不加以确认就进行操作的.
它删除的文件可以用undelete恢复,?但不能恢复子目录及其下的文件,可以用特
殊工具.如NORTON 8.0 等.
若提前使用了undelete/s,?则可以在sentry子目录下找到完整的文件,但名已经
改变了.
九、dos=high]
dos=high,umb 则dos将自身装入高端内存(high)并能管理上位内存(umb).
noumb 则不管理上位内存.
在写入dos=high及umb 前应装入device=himem.sys
为了将程序或驱动程序装入上位内存,必须使用dos=umb,可省出大部分常规内存.
可以在config.sys的任何位置写上dos=high,umb
若显示hma not avoiable 或 load down low 则表明不能使用高端内存.
十、doskey 记录以前敲过的dos命令,可以用F7来显示,用"↑↓"来选择,用F9来输入
选择的命令号.
doskey/restall 重新装入一次,以前的命令行撤消.
doskey/history 显示内存中所有的命令,可以">"显示到其它文件中,缩写"/H".
doskey dir=cls 则击入dir等同于cls一样.
doskey/macros 可显示所有的宏定义,可使用">"重定义到文件中,可缩写"/M".
doskey dir= 可撤消对dir 的宏定义.
doskey p=dir$tdir*.exe/p$tdir c:\t$tdir c:\t$*
$t为命令的区分符,而$*为命令的结束符
doskey/insert(overstrike)?在重新输入命令时,对旧命令的修改是插入还是覆
盖状态(默认).
十一、emm386.exe
提供对扩展内存的管理,使应用程序象使用常规内存一样能够使用它.
常见的用法是 在config.sys 中
device=c:\dos\himem.sys
device=c:\dos\emm386.exe ram
d=64 将DMA 内存数量设置为64K
noems 提供对上位内存的访问,但不提供对扩展内存的访问.
应注意的是在windows中最好不要用它,因为windows本身有对扩展内存进行管理
的程序.应采用windows中的管理器.
十二、fc 命令 fc/b dt.dat dt2.dat>b (作二进制代码比较)
比较两个文件,一般用作存取进度,修改游戏存储文件用.
实际代码位置应加上0100 如:0000 05E4:00 67
实际用debug -e 修改时应加上0100 即 0000 06E4:00 67
后面加上重定向文件">P" 可以将比较结果输出到p文件中.
十三、format /q /u /s /n:sectors /f:size /c
/q参数:快速格式化,仅扫描文件分配表和根目录区,仅对格式化过的磁盘有效.
使用时应确保格式化过后没有增加新的坏道.
/u参数:无条件格式化,并且不保存原来盘上的信息,可以防止"unformat".
/s参数:格式化为系统盘,也可以使用"sys"命令.
/f:size size 可以为160 180 320 360 720 1200 1440 2800
/n:sector n可以为1 格式为单面盘,容量为160k 180k
可以为4 可以在5寸高密驱动器上格式化360k磁盘
可以为8 可以在5寸高密驱动器上进行8个扇区的格式化.
/c 重新测试坏扇区,缺省时如果一个扇区标记为"坏",以后格式时就不在从新测
试,仅作标记,使用"/C"时可以从新测试.
十四、unformat 命令
对用format 格式过,且未用"/u"参数的命令起作用,用它可以来重新修复已经损
坏的硬盘分区表,但对网络盘不起作用.
unformat drive:
/l 显示每一个被unformat发现的文件和子目录,如果没有这个开关,只显示那些
破碎的文件和子目录,可以用ctrl+s 暂停,按任意键继续.
/test 仅作一个测试,不作实际的修复工作,作模拟过程.
/p 一边测试一边打印.
注:这种方法不能保证修复所有的文件,尤其是格式化后又添加过数据的磁盘.
恢复后的文件依次存放在subdir1....2....3等子目录中.
十五、interlnk 语法 interlnk g=e ,它可以通过串口或并口在两机间进行通讯.
将服务器端上的e驱动器映射为客户端的g驱动器,以后对客户端而言,所有对g的
操作都意味着对服务器的访问,取消映射的办法为interlnk g=
单独输入interlnk 则显示所有的映射情况.
注意:interlnk 必须在装入interlnk.exe 设备驱动程序才可以使用.
所用的驱动器符号与config.?sys中lastdrv.exe设置的数目有关.可以作一个一
端为25针,另一端为9针的串行线实现,具体接线方式如下:
5 - 7 2 - 15
3 - 2 3 - 13
7 - 4 4 - 12
6 - 6 5 - 10
3 - 3 6 - 11
8 - 5 15 - 2
4 - 20 13 - 3
9针 25针 12 - 4
10 - 5
11 - 6
25 - 25
25针 25针
十六、interlnk.exe 与intersvr.exe
interlnk.exe 重新定向对于客户驱动器或打印接口的请求到另外的服务器驱动
器或打印机.
语法:config.sys 中加入:
device=c:\dos\interlnk.exe
十七、memmaker
使用memmaker能够优化内存配置,?并将配置写入autoexec.bat和config.sys中.
在这一过程中,需要重新启动几次机器.
十八、memitem memcolor memdefault submenu 菜单选项include
autoexec.bat 中如下: config.sys中如下:
path c:\dos;c:\ucdos
doskey menucolor=15,1(前景色15,背景色1)
\mouse\mouse menuitem=base_config,this is a base
goto %config% ->选择项 menuitem=cced_config,this is a cced
选项 提示
:base_config menudefault=base_config,5
goto exit ->跳出 缺省为base_config,延迟时间5秒
:cced_config
c:\dos\smartdrv.exe /l device=c:\dos\himem.sys
goto exit 各项都包含的共同部分
:exit ->结束
device=c:\dos\emm386.exe ram
dos=high,umb
device=c:\dos\smartdrv.exe/double_buffer
include=base_config 包含base_config设置
可以根据计算机的在不同情况下的配置要求来选择.
十九、mscdex.exe 提供对光驱进行读写的程序
mscdex/drive
典型:config.sys 中device=c:\cdrom\cdrom.sys /d:mscd000
autoexec.bat中 c:\dos\mscdex /d:mscd000 /l:g
配置了一个光驱,符号为g
参数/drive1为光驱身份号,须与config.sys中的符号一致,可有多个
/d:mscd000 /d:mscd001
/e:使用扩展内存装入光驱驱动程序.
/s:使光驱在ms_net或windows是否设置为共享光驱
/V是否在加载时显示内存.
/L:letter 分配给光驱的盘符
/m:number 指定缓冲器的数目
应该注意的是:?如果用smartdrv.exe 加速对光驱的读写能力,应该在autoexec.
bat中将mscdex.?exe 写在smartdrv.exe 之前,smartdrv.exe的使用可大幅提高
对驱动器的读写能力.
二十、msd的使用
使用msd 可以整体检查计算机配置及系统信息
包括:?驱动器参数,计算机cpu参数,内存大小参数,显示器类型,串.并口情况,以
及各个IRQ占用情况,据此可以分析新增设备是否与原来设备有冲突.
同时也可以通过分析内存驻留程序,判断内存中是否有病毒,有则标为"???".
二十一、prompt dos提示符
$q 等于号 $t 当前时间 $d 当前日期 $p 当前驱动器符号
$$ $号提示 $n当前驱动器 $g 大于号 $l小于号 $b 显示"|"管道号
$h 隐去提示符 $E显示"<-"号
对于其它文字,则直接显示文本本身prompt ljw,则显示为ljw提示符
prompt 则仅显示当前驱动器号及大于号.
二十二、ramdrive.sys 使用内存当做虚拟盘来使用
应注意,所有数据都存在于内存中,应及时将其存到硬盘中,否则掉电后或者死机
后将丢失全部数据,优点是运行速度快,但不能在windows中使用.
示例:config.sys: device=c:\dos\ramdrive.sys /size
size为以k为单位的字节数,即建立的虚拟盘的大小.
/e或/a 都是使用扩展内存来建立虚拟盘,?加参数的前提是必须先加载内存管理
器himem.sys及emm386.exe.
二十三、subst 将一个驱动器与一个子目录联接
如:将对A:\l1\l2 子目录的请求映射为S盘,则输入
subst s: a:\l1\l2 即可
这样使用dir s:?等命令则显示的是a:\l1\l2子目录下的内容,其它copy del 一样
可以用subst s: d 来取消这种映射.
可以用subst 来显示各种联接情况
注意:?可以采用subst a: c:a 来建立一个对于A的读写盘.对于某些安装软件
来说,?必须使用A盘来安装,就可以使用先将所要安装的软件全部拷贝到C:a子
目录中,然后输入subst a: c:a,再转到A:,就可以进行软件的安装了.
二十四、mem /c /m /p /d 常规内存显示程序
/c显示所有内存驻留程序的占用情况,分为conventional常规内存和uppermemory
高端内存占用,并显示总的占用情况(常规 高端 保留 扩展内存)
/p分页显示,页间暂停
/m后加模块名 如:/m msdos 显示dos系统内存的占用.
/d对常规 高端 保留 扩展内存加以详细例表说明
通过分析,可以看出内存占用是否合理,以及各种程序是否正常加载,从而在此基
础上使用内存优化工具memmaker进行各种管理,同时又可以分析出一些程序死机
的原因,若有的地方显示"???",则可以断定内存中有病毒的存在,有利于发现及消灭.
二十五、各种管道工具的使用"> < >> <<"
将各种命令造成的输出或所需要的输入重新定向
如ir *.bat /b>p 可以将dir *.bat 例出的文件名输出到p文件中.
time<p>>p.bat
p文件中仅存在一个回车符,则可以将时间追加进p.bat文件中
"> >>" 是将命令产生的输出重新定向,比如到文件或打印机中.
>>产生的内容将追加进文件中,>则将原文件内容覆盖.
"< <<" 是将命令所需要输入的内容重新定向.
如:time<p 在批中可以是时间代码或回车符,可以以此改变时间.
需要说明的是 "prn "为打印机, "null"为空设备
con 为显示器
type p.bat>prn 可将p.bat打印出来.
copy null p 可将p文件删除掉
copy con p 可以在屏幕上编辑p文件,F6可以存盘退出
type p>pp 完成p文件到pp 的复制
type p|more 可在屏满时暂停显示
二十六、move 命令
move filename1 filename2
将文件1移动到文件2处
如:move c:\dos\*.* c:\cced
将dos子目录下的所有文件全部移动到cced 子目录下
/y|-y参数在目标目录不存在需要创建时,是否出现提示
可以使用该命令修改子目录名称,如 move dos cced
将dos目录名改为cced
二十七、append 指定一些特殊数据文件的存放位置,如user.dat pe2.pro等一些非*.
exe *.com *.bat 文件
格式:append 终止以前存在的指定目录 append 显示指定情况
append append c:\user 等
二十八、
call 在一个批处理命令中调用另外一个批处理文件
(1)不终止现有文件的运行,执行完掉用程序后立即返回.
(2)被调用批处理命令必须以bat 为扩展名
(3)调用批处理文件时,可以加上参数(%1-%9)以及环境变量如%baud%
(4)不能使用管道工具及重定向工具
二十九、device devicehigh loadhigh
device 将指定的设备驱动程序装入内存中
devicehigh将指定的设备驱动程序装入高端内存中
loadhigh 将指定的设备驱动程序装入高端内存中
三十、defrag 优化磁盘
legend(传奇) optimize(优化) elapse(逝去) fragment(碎片)
该命令执行对指定的盘进行优化处理(包括检查文件分配表,各文件状态,纠正错误),
在执行时,可按照文件名大小,时间,扩展名对文件进行排序.
--------------------------------------------------------------------------------
转自:
http://www.blueidea.com/bbs/archivecontent.asp?id=1165968
### I. Format of the DIR command:
dir ]
(1) dir /a:attrib by default includes all files (system files, hidden files)
attrib only displays hidden files or non-hidden files.
only displays read-only files or non-read-only files
only displays system files or non-system files
only displays archived files or non-archived files
(2) /osorted: by default in full alphabetical order, subdirectories are displayed before files
/o: in alphabetical order or in reverse order by file name
: in reverse order by extension alphabetical order
: in reverse order by time order
: in reverse order from largest to smallest by size
: with subdirectories before files or files before subdirectories
(3) /s parameter: lists all files in the current directory and its subdirectories
Column name ir /s/a/o:n c:\>PRN
Prints all subdirectories and files on the C drive in alphabetical order according to subdirectories and files with subordinate relationships
(4) /B parameter: only displays file names and extensions
(5) /L parameter: lists files or subdirectories in all lowercase letters
Training:
dir /a lists all files in the current directory (including hidden and system files)
dir /ah lists hidden files (including hidden subdirectories) dir /a-h
dir /as lists system files dir /a-s
dir /ad lists subdirectories dir /a-d
dir /o in alphabetical order
dir /B only displays file names and extensions
### II. attrib
By default, attrib name displays the (file) attributes of the file
attrib io.sys (or subdirectory)
shr c:\ io.sys specifies as system (s) hidden (h) read-only (r) file
You can also attrib *.sys to display the attributes of files with the .sys extension
The parameter sets or removes the read-only attribute of the file
sets or removes the archive attribute of the file
sets or removes the hidden attribute of the file (also works for subdirectories)
/s parameter applies to all files in the current and current subdirectories
Can be used to find files
Example:
attrib news86 lists the document attributes of news86
attrib +r report.txt sets to read-only attrib -s -h record.txt
attrib +a a:*.*
attrib -a a:*.bak
xcopy a: b: /a copies all files marked with "archive" attribute on drive A to drive B
xcopy a: b: /m copies all files on drive A to drive B and removes the archive attribute
### III. Introduction to cd: cd... returns to the second-level directory "." represents the current directory "." represents the parent directory
cd ..\.. returns to the parent directory of the parent directory (grandparent directory)
cd A:\ changes the current directory of drive A to the root directory
cd A:\xx changes the current directory of drive A to the subdirectory xx
cd ..\98 returns to the parent directory first, then enters the 98 subdirectory under the parent directory
cd .. returns to the parent directory
cd\98 enters the 98 subdirectory under the root directory
### IV. copy
copy /y overwrites all files without prompting
/-y prompts for all files (asks yes or no)
/v verifies after copying
/B displays in binary
copy w1.wps con/b can display the wps file on the screen without entering the wps state
copy ..\98 copies all files in the 98 subdirectory under the parent directory to the current subdirectory
copy .\97 copies all files in the 97 subdirectory under the current directory to the current directory
copy . c:\ copies all files in the current directory to the root directory of drive C
. means *.* files
copy nul a.abc clears the a.abc file (file length is changed to 0)
copy file name+con appends commands or content to the text file
copy con file name creates a text file (F6 saves and exits)
copy con prn detects the printer switch
### V. xcopy command
xcopy
xcopy xcopy a:b:\ /d:08/18/98/s/v copies files after 08/18/98
xcopy prompts to create a subdirectory
xcopy copies subdirectories together. Note: If the subdirectory does not exist on the target disk and the end of the target disk does not end with "\", it will prompt:
does destination specify a file name or directory name on the target
?
Create a file on the target disk or create a subdirectory ? You should press the d key
xcopy with verification
*1) xcopy does not copy system and hidden files, you should modify the attributes first and then copy
xcopy whether there is a prompt when overwriting, /y without prompt
If the target disk or subdirectory name is omitted, it is copied to the current directory
### VI. del /p
Adding /p can prompt before deleting
If del is followed by a subdirectory name, all files (except hidden, system, read-only files) under the subdirectory are deleted. Adding /p can confirm.
### VII. undelete /au
Recovers all files that meet the conditions without prompting (can be recovered), and sets the first letter to "#". If it already exists, it is added in the order of "# % & 0 1 2-9 a-z".
For example: undelete *.dbf/au recovers all files with the extension "dbf" and uses "#" as the file name. /list only lists recoverable files without recovering
undelete /load loads undelete into memory
/unload unloads undelete from memory
/s monitors and manages the specified drive
undelete/sc keeps undelete in memory,? and creates an implicit sentry subdirectory to manage files deleted from drive C. undelete/ds recovers
The corresponding recovery command can be undelete to fully recover the file name (very complete)
The most commonly used is undelete *.*
deltree /y
deltree deletes subdirectories and files, although some files are system files or hidden files
It can have wildcards, and when it has wildcards, it will delete files and subdirectories that meet the conditions
For example: ?undelete *.dbf/au recovers all files with the extension "dbf" and uses "#" as the file name.
/list only lists recoverable files without recovery operations.
undelete/load loads undelete into memory.
/unload unloads undelete from memory.
/s monitors and manages the specified drive.
undelete/sc keeps undelete in memory and creates an implicit sentry subdirectory to manage files deleted from drive C. The corresponding recovery command can be undelete/ds to fully recover the file name (very complete).
The most commonly used is undelete *.*
### VIII. deltree /y
deltree deletes subdirectories and files, although some files are system or hidden.
It can have wildcards, and then it will delete files or subdirectories that meet the conditions.
For example: There are L1 file, L2 subdirectory, L3 file, L4 subdirectory
deltree L*.* will delete all the above files and subdirectories, but confirm before deleting. If you don't delete, you can enter "N".
/y parameter is to operate without confirmation before deleting.
The deleted files can be recovered with undelete,? but subdirectories and files under them cannot be recovered. Special tools such as NORTON 8.0 can be used.
If undelete/s is used in advance, you can find the complete file in the sentry subdirectory, but the name has been changed.
### IX. dos=high]
dos=high, umb then dos loads itself into the upper memory (high) and can manage the upper memory (umb).
noumb then does not manage the upper memory.
Before writing dos=high and umb, device=himem.sys must be loaded
In order to load programs or drivers into the upper memory, dos=umb must be used, which can save most conventional memory.
You can write dos=high, umb anywhere in config.sys
If hma not avoiable or load down low is displayed, it means that the upper memory cannot be used.
### X. doskey records previously typed dos commands, can be displayed with F7, selected with "↑↓", and the command number can be entered with F9.
doskey/restall reloads once, and the previous command line is canceled.
doskey/history displays all commands in memory, can be ">" displayed to other files, abbreviated "/H".
doskey dir=cls means that hitting dir is equivalent to cls.
doskey/macros can display all macro definitions, can use ">" to redefine to a file, can be abbreviated "/M".
doskey dir= can cancel the macro definition of dir.
doskey p=dir$tdir*.exe/p$tdir c:\t$tdir c:\t$*
$t is the command separator, and $* is the command end character
doskey/insert(overstrike)? When re-entering the command, whether the modification of the old command is in insert or overwrite state (default).
### XI. emm386.exe
Provides management of extended memory, so that applications can use it like using conventional memory.
Common usage is in config.sys
device=c:\dos\himem.sys
device=c:\dos\emm386.exe ram
d=64 sets the DMA memory amount to 64K
noems provides access to upper memory but not to extended memory.
It should be noted that it is best not to use it in windows because windows itself has a program to manage extended memory. The manager in windows should be used.
### XII. fc command fc/b dt.dat dt2.dat>b (compares binary codes)
Compare two files, generally used for access progress, modifying game save files.
The actual code position should add 0100 such as: 0000 05E4:00 67
When actually using debug -e to modify, 0100 should be added, that is, 0000 06E4:00 67
Adding a redirect file ">P" later can output the comparison result to the p file.
### XIII. format /q /u /s /n:sectors /f:size /c
/q parameter: quick format, only scans the file allocation table and root directory area, only valid for formatted disks.
Use it to ensure that no new bad sectors are added after formatting.
/u parameter: unconditional formatting, and does not save the original information on the disk, which can prevent "unformat".
/s parameter: format as a system disk, can also use "sys" command.
/f:size size can be 160 180 320 360 720 1200 1440 2800
/n:sector n can be 1 format as a single-sided disk with a capacity of 160k 180k
can be 4 can format a 360k disk on a 5-inch high-density drive
can be 8 can format with 8 sectors on a 5-inch high-density drive.
/c retests bad sectors. By default, if a sector is marked as "bad", it will not be retested in future formatting, only marked. When using "/C", it can be retested.
### XIV. unformat command
Works for disks formatted with format and not using the "/u" parameter. It can be used to re-repair the damaged hard disk partition table, but does not work for network disks.
unformat drive:
/l displays each file and subdirectory found by unformat. If there is no this switch, only the broken files and subdirectories are displayed. You can press ctrl+s to pause and any key to continue.
/test only makes a test, does not do actual repair work, does simulation process.
/p prints while testing.
Note: This method cannot guarantee to repair all files, especially disks that have added data after formatting.
Recovered files are stored in subdir1....2....3 and other subdirectories in turn.
### XV. interlnk syntax interlnk g=e, it can communicate between two machines through serial port or parallel port.
Map drive e on the server side as drive g on the client side. In the future, all operations on g for the client mean access to the server. The way to cancel the mapping is interlnk g=
Entering interlnk alone displays all mapping situations.
Note: interlnk must be used after loading the interlnk.exe device driver.
The drive letter used is related to the number set by lastdrv.exe in config.?sys. A serial line with one end being 25-pin and the other end being 9-pin can be implemented. The specific wiring method is as follows:
5 - 7 2 - 15
3 - 2 3 - 13
7 - 4 4 - 12
6 - 6 5 - 10
3 - 3 6 - 11
8 - 5 15 - 2
4 - 20 13 - 3
9-pin 25-pin 12 - 4
10 - 5
11 - 6
25 - 25
25-pin 25-pin
### XVI. interlnk.exe and intersvr.exe
interlnk.exe redirects requests for client drives or print interfaces to other server drives or printers.
Syntax: Add in config.sys:
device=c:\dos\interlnk.exe
### XVII. memmaker
Using memmaker can optimize the memory configuration and write the configuration to autoexec.bat and config.sys.
In this process, the machine needs to be restarted several times.
### XVIII.memitem memcolor memdefault submenu menu optioninclude
In autoexec.bat as follows: In config.sys as follows:
path c:\dos;c:\ucdos
doskey menucolor=15,1(foreground color 15, background color 1)
\mouse\mouse menuitem=base_config,this is a base
goto %config% -> selection item menuitem=cced_config,this is a cced
Option prompt
:base_config menudefault=base_config,5
goto exit -> jump out default is base_config, delay time 5 seconds
:cced_config
c:\dos\smartdrv.exe /l device=c:\dos\himem.sys
goto exit common part included in each item
:exit -> end
device=c:\dos\emm386.exe ram
dos=high,umb
device=c:\dos\smartdrv.exe/double_buffer
include=base_config include base_config settings
Can be selected according to the configuration requirements of the computer in different situations.
### XIX. mscdex.exe provides a program for reading and writing to the optical drive
mscdex/drive
Typical: device=c:\cdrom\cdrom.sys /d:mscd000 in config.sys
mscdex /d:mscd000 /l:g in autoexec.bat
Configured an optical drive with the symbol g
Parameter /drive1 is the optical drive ID number, which must be consistent with the symbol in config.sys, and there can be multiple
/d:mscd000 /d:mscd001
/e: use extended memory to load the optical drive driver.
/s: make the optical drive set as a shared optical drive in ms_net or windows
/V whether to display memory when loading.
/L:letter assigns the drive letter to the optical drive
/m:number specifies the number of buffers
It should be noted that:? If using smartdrv.exe to accelerate the reading and writing ability of the optical drive, mscdex.?exe should be written before smartdrv.exe in autoexec.
bat, the use of smartdrv.exe can greatly improve the reading and writing ability of the drive.
### XX. Use of msd
Using msd can overall check the computer configuration and system information
Including:? Drive parameters, computer cpu parameters, memory size parameters, monitor type, serial and parallel port conditions, and various IRQ occupation conditions. Based on this, it can analyze whether the new device has a conflict with the original device.
At the same time, by analyzing the memory resident program, it can judge whether there is a virus in the memory, and if so, mark it as "???".
### XXI. prompt dos prompt
$q equal sign $t current time $d current date $p current drive symbol
$$ $ sign prompt $n current drive $g greater than sign $l less than sign $b display "|" pipe symbol
$h hides the prompt $E displays "<-" sign
For other text, it directly displays the text itself prompt ljw, then displays as ljw prompt
prompt only displays the current drive letter and greater than sign.
### XXII. ramdrive.sys uses memory as a virtual disk for use
It should be noted that all data exists in memory, and it should be saved to the hard disk in time, otherwise all data will be lost after power failure or crash. The advantage is that the running speed is fast, but it cannot be used in windows.
Example: config.sys: device=c:\dos\ramdrive.sys /size
size is the number of bytes in units of k, that is, the size of the established virtual disk.
/e or/a both use extended memory to establish a virtual disk. The premise of adding parameters is to load the memory manager himem.sys and emm386.exe first.
### XXIII. subst connects a drive to a subdirectory
For example: Map the request for the A:\l1\l2 subdirectory to drive S, then enter
subst s: a:\l1\l2 can be
In this way, commands such as dir s:? display the content under the a:\l1\l2 subdirectory, and the same for other copy del
You can use subst s: d to cancel this mapping.
You can use subst to display various connection situations
Note:? You can use subst a: c:a to create a read-write disk for A. For some installation software
来说,? must use drive A to install, you can use first copy all the software to be installed to the C:a sub
directory, then enter subst a: c:a, then go to A:, you can install the software.
### XXIV. mem /c /m /p /d conventional memory display program
/c displays the occupation of all memory resident programs, divided into conventional memory and uppermemory
High-end memory occupation, and displays the total occupation (conventional high-end reserved extended memory)
/p paginated display, pause between pages
/m followed by module name such as: /m msdos displays the occupation of dos system memory.
/d gives a detailed list description of conventional high-end reserved extended memory
By analyzing, you can see whether the memory occupation is reasonable, and whether various programs are loaded normally. On this basis, use the memory optimization tool memmaker for various management. At the same time, you can analyze the reason for some program crashes. If there is "???" in some places, it can be determined that there is a virus in the memory, which is conducive to discovery and elimination.
### XXV. Use of various pipeline tools "> < >> <<"
Redirect the output or input required by various commands
For example, ir *.bat /b>p can output the file name listed by dir *.bat to the p file.
time<p>>p.bat
If there is only one carriage return character in the p file, the time can be appended to the p.bat file
"> >>" is to redirect the output generated by the command, such as to a file or printer.
The content generated by >> will be appended to the file, and > will overwrite the original file content.
"< <<" is to redirect the input content required by the command.
For example: time<p in the batch can be time code or carriage return character, which can change the time.
It should be noted that "prn " is the printer, "null" is the empty device
con is the display
type p.bat>prn can print out p.bat.
copy null p can delete the p file
copy con p can edit the p file on the screen, F6 can save and exit
type p>pp completes the copy of the p file to pp
type p|more can pause display when the screen is full
### XXVI. move command
move filename1 filename2
Move file 1 to file 2
For example: move c:\dos\*.* c:\cced
Move all files in the dos subdirectory to the cced subdirectory
/y|-y parameter when the target directory does not exist and needs to be created, whether there is a prompt
You can use this command to modify the subdirectory name, such as move dos cced
Rename the dos directory to cced
### XXVII. append specifies the storage location of some special data files, such as user.dat pe2.pro and other non-*.
exe *.com *.bat files
Format: append terminates the previously specified directory append displays the specified situation
append append c:\user, etc.
### XXVIII.
call calls another batch file in a batch command
(1) Does not terminate the operation of the existing file, and returns immediately after executing the called program.
(2) The called batch command must have the bat extension
(3) When calling the batch file, parameters (%1-%9) and environment variables such as %baud% can be added
(4) Pipeline tools and redirect tools cannot be used
### XXIX. device devicehigh loadhigh
device loads the specified device driver into memory
devicehigh loads the specified device driver into upper memory
loadhigh loads the specified device driver into upper memory
### XXX. defrag optimize disk
legend (legend) optimize (optimize) elapse (elapse) fragment (fragment)
This command performs optimization processing on the specified disk (including checking the file allocation table, various file states, correcting errors), and when executing, it can sort files according to file name size, time, extension.
--------------------------------------------------------------------------------
Transferred from:
http://www.blueidea.com/bbs/archivecontent.asp?id=1165968