CMD常用命令大全

如题所述

第1个回答  2011-04-18
[盘符:]
cd\
md
cls
copy
xcopy
del
rd
attrib
exit
cmd
for
set
echo
想明白这些用法,就到 cmd 里输入 命令/? 就会显示帮助内容了。
比如: dir/? 显示如下:

显示目录中的文件和子目录列表。

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
指定要列出的驱动器、目录和/或文件。

/A 显示具有指定属性的文件。
attributes D 目录 R 只读文件
H 隐藏文件 A 准备存档的文件
S 系统文件 - 表示“否”的前缀
/B 使用空格式(没有标题信息或摘要)。
/C 在文件大小中显示千位数分隔符。这是默认值。用 /-C 来
停用分隔符显示。
/D 跟宽式相同,但文件是按栏分类列出的。
/L 用小写。
/N 新的长列表格式,其中文件名在最右边。
/O 用分类顺序列出文件。
sortorder N 按名称(字母顺序) S 按大小(从小到大)
E 按扩展名(字母顺序) D 按日期/时间(从先到后)
G 组目录优先 - 颠倒顺序的前缀
/P 在每个信息屏幕后暂停。
/Q 显示文件所有者。
/S 显示指定目录和所有子目录中的文件。
/T 控制显示或用来分类的时间字符域。
timefield C 创建时间
A 上次访问时间
W 上次写入的时间
/W 用宽列表格式。
/X 显示为非 8dot3 文件名产生的短名称。格式是 /N 的格式,
短名称插在长名称前面。如果没有短名称,在其位置则
显示空白。
/4 用四位数字显示年

可以在 DIRCMD 环境变量中预先设定开关。通过添加前缀 - (破折号)
来替代预先设定的开关。例如,/-W。

方法教给你了,看你怎么学了。。祝你好运。
第2个回答  2020-04-05
ping
ip(或域名)
向对方主机发送默认大小为32字节的数据,参数:“-l[空格]数据包大小”;“-n发送数据次数”;“-t”指一直ping。
  ping
-t
-l
65550
ip
死亡之ping(发送大于64K的文件并一直ping就成了死亡之ping)
  ipconfig
(winipcfg)
用于windows
NT及XP(windows
95
98)查看本地ip地址,ipconfig可用参数“/all”显示全部配置信息
  tlist
-t
以树行列表显示进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools文件夹内)
  kill
-F
进程名
加-F参数后强制结束某进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools文件夹内)
  del
-F
文件名
加-F参数后就可删除只读文件,/AR、/AH、/AS、/AA分别表示删除只读、隐藏、系统、存档文件,/A-R、/A-H、/A-S、/A-A表示删除除只读、隐藏、系统、存档以外的文件。例如“DEL/AR
*.*”表示删除当前目录下所有只读文件,“DEL/A-S
*.*”表示删除当前目录下除系统文件以外的所有文件
  del
/S
/Q
目录
或用:rmdir
/s
/Q
目录
/S删除目录及目录下的所有子目录和文件。同时使用参数/Q
可取消删除操作时的系统确认就直接删除。(二个命令作用相同)
  move
盘符路径要移动的文件名 存放移动文件的路径移动后文件名
移动文件,用参数/y将取消确认移动目录存在相同文件的提示就直接覆盖
  fc
one.txt
two.txt
>
3st.txt
对比二个文件并把不同之处输出到3st.txt文件中,">
"和">
>"
是重定向命令
  at
id号
开启已注册的某个计划任务
  at
/delete
停止所有计划任务,用参数/yes则不需要确认就直接停止
  at
id号
/delete
停止某个已注册的计划任务
  at
查看所有的计划任务
  at
ip
time
程序名(或一个命令)
/r
在某时间运行对方某程序并重新启动计算机
  finger
username
@host
查看最近有哪些用户登陆
  telnet
ip
端口
远和登陆服务器,默认端口为23
  open
ip
连接到IP(属telnet登陆后的命令)
  telnet
在本机上直接键入telnet
将进入本机的telnet
  copy
路径文件名1 路径文件名2
/y
复制文件1到指定的目录为文件2,用参数/y就同时取消确认你要改写一份现存目录文件
  copy
c:srv.exe
ipadmin$
复制本地c:srv.exe到对方的admin下
  copy
1st.jpg/b+2st.txt/a
3st.jpg
将2st.txt的内容藏身到1st.jpg中生成3st.jpg新的文件,注:2st.txt文件头要空三排,参数:/b指二进制文件,/a指ASCLL格式文件
  copy
ipadmin$svv.exe
c:
或:copyipadmin$*.*
复制对方admini$共享下的srv.exe文件(所有文件)至本地C:
  xcopy
要复制的文件或目录树 目标地址目录名
复制文件和目录树,用参数/Y将不提示覆盖相同文件
  用参数/e才可连目录下的子目录一起复制到目标地址下。
  tftp
-i
自己IP(用肉机作跳板时这用肉机IP)
get
server.exe
c:server.exe
登陆后,将“IP”的server.exe下载到目标主机c:server.exe
参数:-i指以二进制模式传送,如传送exe文件时用,如不加-i
则以ASCII模式(传送文本文件模式)进行传送
  tftp
-i
对方IP put
c:server.exe
登陆后,上传本地c:server.exe至主机
  ftp
ip
端口
用于上传文件至服务器或进行文件操作,默认端口为21。bin指用二进制方式传送(可执行文件进);默认为ASCII格式传送(文本文件时)
  route
print
显示出IP路由,将主要显示网络地址Network
addres,子网掩码Netmask,网关地址Gateway
addres,接口地址Interface
  arp
查看和处理ARP缓存,ARP是名字解析的意思,负责把一个IP解析成一个物理性的MAC地址。arp
-a将显示出全部信息
  start
程序名或命令
/max
或/min
新开一个新窗口并最大化(最小化)运行某程序或命令
  mem
查看cpu使用情况
  attrib
文件名(目录名)
查看某文件(目录)的属性
  attrib
文件名
-A
-R
-S
-H

+A
+R
+S
+H
去掉(添加)某文件的
存档,只读,系统,隐藏
属性;用+则是添加为某属性
  dir
查看文件,参数:/Q显示文件及目录属系统哪个用户,/T:C显示文件创建时间,/T:A显示文件上次被访问时间,/T:W上次被修改时间
  date
/t

time
/t
使用此参数即“DATE/T”、“TIME/T”将只显示当前日期和时间,而不必输入新日期和时间
  set
指定环境变量名称=要指派给变量的字符
设置环境变量
  set
显示当前所有的环境变量
  set
p(或其它字符)
显示出当前以字符p(或其它字符)开头的所有环境变量
  pause
暂停批处理程序,并显示出:请按任意键继续....
  if
在批处理程序中执行条件处理(更多说明见if命令及变量)
  goto
标签
将cmd.exe导向到批处理程序中带标签的行(标签必须单独一行,且以冒号打头,例如:“:start”标签)
  call
路径批处理文件名
从批处理程序中调用另一个批处理程序
(更多说明见call
/?)
  for
对一组文件中的每一个文件执行某个特定命令(更多说明见for命令及变量)
  echo
on或off
打开或关闭echo,仅用echo不加参数则显示当前echo设置
  echo
信息
在屏幕上显示出信息
  echo
信息
>>
pass.txt
将"信息"保存到pass.txt文件中
  findstr
"Hello"
aa.txt
在aa.txt文件中寻找字符串hello
  find
文件名
查找某文件
  title
标题名字
更改CMD窗口标题名字
  color
颜色值
设置cmd控制台前景和背景颜色;0=黑、1=蓝、2=绿、3=浅绿、4=红、5=紫、6=黄、7=白、8=灰、9=淡蓝、A=淡绿、B=淡浅绿、C=淡红、D=淡紫、E=淡黄、F=亮白
  prompt
名称
更改cmd.exe的显示的命令提示符(把C:、D:统一改为:EntSky
)
  ver
在DOS窗口下显示版本信息
  winver
弹出一个窗口显示版本信息(内存大小、系统版本、补丁版本、计算机名)
  format
盘符
/FS:类型
格式化磁盘,类型:FAT、FAT32、NTFS
,例:Format
D:
/FS:NTFS
  md 目录名
创建目录
  replace
源文件 要替换文件的目录
替换文件
  ren
原文件名 新文件名
重命名文件名
  tree
以树形结构显示出目录,用参数-f
将列出第个文件夹中文件名称
  type
文件名
显示文本文件的内容
  more
文件名
逐屏显示输出文件
  doskey
要锁定的命令=字符
  doskey
要解锁命令=
为DOS提供的锁定命令(编辑命令行,重新调用win2k命令,并创建宏)。如:锁定dir命令:doskey
dir=entsky
(不能用doskey
dir=dir);解锁:doskey
dir=
  taskmgr
调出任务管理器
  chkdsk
/F
D:
检查磁盘D并显示状态报告;加参数/f并修复磁盘上的错误
  tlntadmn
telnt服务admn,键入tlntadmn选择3,再选择8,就可以更改telnet服务默认端口23为其它任何端口
  exit
退出cmd.exe程序或目前,用参数/B则是退出当前批处理脚本而不是cmd.exe
  path
路径可执行文件的文件名
为可执行文件设置一个路径。
  cmd
启动一个win2K命令解释窗口。参数:/eff、/en
关闭、开启命令扩展;更我详细说明见cmd
/?
  regedit
/s
注册表文件名
导入注册表;参数/S指安静模式导入,无任何提示;
  regedit
/e
注册表文件名
导出注册表
  cacls
文件名 参数
显示或修改文件访问控制列表(ACL)——针对NTFS格式时。参数:/D
用户名:设定拒绝某用户访问;/P
用户名:perm
替换指定用户的访问权限;/G
用户名:perm
赋予指定用户访问权限;Perm
可以是:
N
无,R
读取,
W
写入,
C
更改(写入),F
完全控制;例:cacls
D:
est.txt
/D
pub
设定d:
est.txt拒绝pub用户访问。
  cacls
文件名
查看文件的访问用户权限列表
  REM
文本内容
在批处理文件中添加注解
  netsh
查看或更改本地网络配置情况
第3个回答  2019-01-31
命令大全

1. calc-----------启动计算器

2.certmgr.msc----证书管理实用程序

3.charmap-------

4.chkdsk.exe-----Chkdsk磁盘检查

5. ciadv.msc------索引服务程序

6. cleanmgr-------垃圾整理

7. cliconfg-------SQL SERVER 客户端网络实用程序

8. Clipbrd--------剪贴板查看器

9. 

10. compmgmt.msc---

11. conf-----------启动netmeeting

12. dcomcnfg-------

13. ddeshare-------打开DDE共享设置

14. devmgmt.msc--- 

15. dfrg.msc------

16. diskmgmt.msc---

17. drwtsn32------ 系统医生

18. dvdplay--------DVD播放器

19. dxdiag---------检查DirectX信息

20. explorer-------

21. eudcedit-------造字程序

22. eventvwr-------

23. fsmgmt.msc-----

24. gpedit.msc-----

25. iexpress-------木马捆绑工具,系统自带

26. logoff---------注销命令

27. lusrmgr.msc----本机用户和组

28. notepad--------打开记事本

29. magnify--------放大镜实用程序

30. mem.exe--------

31. mmc------------打开控制台49.

32. mobsync--------同步命令

33.mplayer2-------简易widnows media player

34. Msconfig.exe---系统配置实用程序

35. mspaint--------

36. mstsc----------

37. narrator-

38. net start messenger

39. netstat -an----(TC)命令检查接口
第4个回答  2011-04-18
在cmd下输入help,所有的命令都会显示的

C:\Documents and Settings\aaa>help
For more information on a specific command, type HELP command-name
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 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 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.
FTYPE Displays or modifies file types used in file extension associations.
GOTO Directs the Windows command interpreter to a labeled line in a
batch program.
GRAFTABL Enables Windows to display an extended character set in graphics
mode.
HELP Provides Help information for Windows 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 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 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 version.
VERIFY Tells Windows 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.
第5个回答  2005-12-26
进入 dos后输入 help 回车

常用的命令
cd 改变当前目录

cls 清屏

copy 拷贝文件

del 删除文件

deltree 删除目录树

dir 列文件名

diskcopy 复制磁盘

edit 文本编辑

format 格式化磁盘

md 建立子目录

mem 查看内存状况

more 分屏显示

move 移动文件、改目录名

rd 删除目录

ren 改变文件名

type 显示文件内容

sys 制作DOS系统盘

xcopy 拷贝目录与文件
attrib 设置文件属性

chkdsk 检查磁盘

date 显示及修改日期

defrag 磁盘碎片整理

doskey 重新调用DOS命令

emm386 扩展内存管理

fdisk 硬盘分区

help 帮助

label 设置卷标号

lh 将程序装入高端内存

memmaker内存优化管理

msd 系统检测

path 设置搜寻目录

prempt 设置提示符

restore 恢复备份文件

time 显示及修改时间

scandisk检测、修理磁盘

set 设置环境变量

smartdrv设置磁盘加速器

undelete恢复被删的文件

append 设置非执行文件路径

debug 随机调试程序

diskcomp磁盘比较

expand 还原DOS文件

fasthelp快速显示帮助信息

fc 文件比较

interink启动服务器

intersvr启动客户机

qbasic Basic集成环境

setver 设置版本

share 文件共享

subst 路径替换

tree 列目录树

unformat恢复已格式化的磁盘

vsafe 防病毒

ver 显示DOS版本号

vol 显示磁盘卷标号

ctty 改变控制设备

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网