常用cmd
md qq //创建文件夹
cd .. //返回上级目录
cd www //进入目录
d: //进入d盘
rd qq // 删除空文件夹
del 1.txt /q //删除文件或目录 不确认
ren qq vv //重命名
type 1.txt //读取并显示
ipconfig //查看本地ip
ping www.baidu.com //查看ip
pause //暂停
upx 1.exe //压缩exe文件
wget //下载文件
curl //提交文件
7z a 1.zip yoby_tt //压缩
nvm settings.txt //下载node工具
启动隐藏窗口
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
REM
windows后台运行
dim objShell
set objShell=wscript.createObject("WScript.Shell")
dim path
path = createobject("Scripting.FileSystemObject").GetFolder(".").Path
msgbox "启动程序进程成功"
iReturnCode=objShell.Run(path&"\hello.exe",0,TRUE)
共享上网.cmd
netsh wlan set hostednetwork mode=allow
netsh wlan set hostednetwork ssid=cmcc key=12345678
netsh wlan start hostednetwork
pause
修复网络.cmd
netsh winsock reset pause
右键记事本打开.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*\shell\Notepad2]
@="Notepad2"
[HKEY_CLASSES_ROOT*\shell\Notepad2\command]
@="Notepad.exe %1"
notepad++
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\NotePad++]
@="用&Notepad++打开"
"Icon"="C:\\server\\npp\\notepad++.exe"
[HKEY_CLASSES_ROOT\*\shell\NotePad++\Command]
@="C:\\server\\npp\\notepad++.exe \"%1\""
cmder支持ls等linux命令,只需要添加C:\app\Git\bin
到path路径
wsl2 固定IP,这样适合绑定frp
wsl -d Ubuntu-18.04 -u root ip addr add 192.168.50.16/24 broadcast 192.168.50.255 dev eth0 label eth0:1
netsh interface ip add address "vEthernet (WSL)" 192.168.50.88 255.255.255.0
pause
文档更新时间: 2022-09-13 17:55 作者:Yoby