Windows cmd Common Commands

本文详细列举了Windows系统中用于查看和管理环境变量、进程、文件及磁盘的各种命令,如setx设置系统变量,tasklist显示运行进程,taskkill结束进程,move和copy移动及复制文件,以及disk管理命令如创建、删除分区等。这些命令为日常系统维护和文件操作提供了便利。

System Variables

set: show all environment variables:

Windows: List Environment Variables - CMD & PowerShell - ShellHacks

setx: set system variables

​​​​​​setx | Microsoft Docs​​​​​​

path: no args --> pwd or set user/system path variables (path for searching for .exe)

path | Microsoft Docs

date: show/set system date

date | Microsoft Docs

Processes Management

tasklist: show all running processes and fitler

tasklist | Microsoft Docs

taskkill: end target running processes

taskkill | Microsoft Docs

File Management

move: mv

move | Microsoft Docs

copy: cp

copy | Microsoft Docs

erase/del: Deletes one or more files. If you use erase to delete a file from your disk, you can't retrieve it.

erase | Microsoft Docs

rd/rmdir: delete directories

rmdir | Microsoft Docs

comp: byte-wise file comparison:

comp | Microsoft Docs

rename: 

  • You can't specify a new drive or path when renaming files. You also can't use this command to rename files across drives or to move files to a different directory.

rename | Microsoft Docs

where: search for files, similar to linux 'find' and 'which'

where | Microsoft Docs

Disk Management

create: Creates a partition or shadow on a disk, a volume on one or more disks, or a virtual hard disk (VHD).

create | Microsoft Docs

delete: Deletes a partition or a volume. It also deletes a dynamic disk from the list of disks. ==> !!!! not a file level command ==> use 'del' for file management

delete | Microsoft Docs

clean: delete all partitions

clean | Microsoft Docs

recover: salvage good data from a bad disk

recover | Microsoft Docs

remove: Removes a drive letter or mount point from the volume with focus. ==> not a file level command !!!

remove | Microsoft Docs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值