Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows CMD 常用命令 #41

Open
JasonWu73 opened this issue Feb 7, 2020 · 0 comments
Open

Windows CMD 常用命令 #41

JasonWu73 opened this issue Feb 7, 2020 · 0 comments
Labels
工具 简易上手

Comments

@JasonWu73
Copy link
Owner

JasonWu73 commented Feb 7, 2020

查看命令行帮助

命令 描述
<cmd_builtin_command> /? 查看命令行帮助文档
where <command> 查看命令行工具所在的位置

打印字符串

命令 描述
echo %Path% 打印环境变量

切换字符编码

命令 描述
chcp 查看当前字符编码
chcp 65001 切换为 UTF-8
chcp 936 切换为 GBK

切换目录

命令 描述
cd 显示当前目录路径
cd .. 切换至上级目录
c: 切换至 C 盘

打开目录

命令 描述
start . 在资源管理器中打开当前目录

查看文件(夹)内容

命令 描述
subl a.txt 在 Sublime Text 3 中打开或创建文件
subl . 在 Sublime Text 3 中打开当前文件夹
type a.txt 查看文件内容

查看目录

命令 描述
dir 查看当前目录中非隐藏文件和文件夹
dir /ah 查看当前目录中隐藏文件和文件夹
dir /a 查看当前目录中所有文件和文件夹
tree 显示当前目录的文件和目录列表
tree /f 显示当前目录及其子目录中的文件和目录列表

创建文件(夹)

命令 描述
mkdir mydir 创建文件夹
type nul > my.txt 创建空文件

移动文件(夹)

命令 描述
move my.txt .\mydir 移动文件
move .\mydir ..\ 移动文件夹

重命名文件(夹)

命令 描述
rename my.txt me.txt 重命名文件
rename mydir medir 重命名文件夹

删除文件(夹)

命令 描述
del /q me.txt 删除文件
del /q medir 删除文件夹中的所有文件
rmdir /s /q medir 删除文件夹及其中的所有文件
@JasonWu73 JasonWu73 added the 手册 备忘速查 label Feb 7, 2020
@JasonWu73 JasonWu73 changed the title CMD 常用命令 Windows CMD 常用命令 Feb 7, 2020
@JasonWu73 JasonWu73 added 工具 简易上手 and removed 手册 备忘速查 labels Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
工具 简易上手
Projects
Microsoft Windows
Awaiting triage
Development

No branches or pull requests

1 participant