查看IP
ipconfig
查看WIFI密码
netsh wlan show profiles wifi_name key = clear
系统探针
systeminfo
CMD重定向
输出符号> >>
写
cmd >
追加
cmd >>
eg:
C:Users大飞斗>
C:Users大飞斗>ipconfig > d:/ip.txt
C:Users大飞斗>
C:Users大飞斗>echo hello CMD>d: .txt
C:Users大飞斗>
C:Users大飞斗>echo CMD is so POWERFUL ___HugBoy.>>d: .txt
C:Users大飞斗>
输入符号 < <<
文件操作
切换磁盘
#D:
文件夹
创建
#mkdir dir_name
或
#md dir_name
打开
#dir /b
打开当前文件夹
#start .
切换
#cd dir_name
删除
#rd
文件
添加
#cd > file_name
查看
#type file_name
记事本编辑
#file_name
覆盖写
#echo "hello world">file_name
追加写
#echo >> "hello world">file_name
删除
#del file_name
cmd自定义命令方法
我的自定义命令
1.新建文件C:Users大飞斗cmd-alias.bat
doskey sayhello=echo Hello $*
doskey cattxt=type xxxxxxxxxxxx.txt $*
@doskey ls=dir /b $*
@doskey l=dir /od/p/q/tw $*
注:
doskey就相当于Linux中的alias,
$*表示这个命令还可能有其他参数,
@表示执行这条命令时不显示这条命令本身
第二个命令type xxxxxxxxxxxx.txt的作用是读取txt文件内容并打印到屏幕,等同于Linux下的cat
2.使用Win+R,输入regedit进入注册表,找到HKEY_LOCAL_MACHINESoftwareMicrosoftCommand Processor,右键新建,字符串值,名为AutoRun,右键修改,值为C:cmd-alias.bat,保存退出。
DOS(可先跳过)
记录一些感觉比较鸡肋的cmd命令,不枉我曾在茫茫网海遇到过这些命令。hhh
1.隐藏DOS提示符`C:Usersxxx>`
echo off
echo on
2.