首页 系统常用shell命令
文章
取消

系统常用shell命令

系统常用shell命令

CMD

命令功能
dirls
xcopy D:\A F:\B /T/E复制D:\A中的目录结构
dir /s /b > list.txt导出目录到txt
rundll32.exe user32.dll LockWorkStation锁屏(win+L)
  
  

[重置时间](https://learn.microsoft.com/zh-cn/answers/questions/4261773/question-4261773 )

1
2
3
4
5
net stop w32time 停止Windows Time服务
w32tm /unregister 取消注册Windows Time服务
w32tm /register 重新注册Windows Time服务
net start w32time 重新启动Windows Time服务
w32tm /resync /nowait 重新进行Windows时间同步

VB

代码功能
Dim WSHShell
Set WSHShell=WScript.CreateObject("WScript.Shell")
WSHShell.Run "Rundll32.exe user32.dll,LockWorkStation", 0
锁屏

MAC

codefunc
  
本文由作者按照 CC BY 4.0 进行授权