当前位置:网站首页>cmd cpm 命令汇总
cmd cpm 命令汇总
2022-07-26 03:01:00 【阿狸lyinshaofeng】
# cmd操作
cmd是windows操作系统自带的一个命令提示框(命令操作界面),可以对当前操作系统进行一些操作。
#### cd:
切换目录
cd ../abc 切换到当前路径下的上级路径下的abc目录
#### dir:
查看当前目录的简要情况 包括当前路径的所有文件和存储情况
#### mkdir:
创建一个目录 缩写 : md
mkdir abc 在当前路径创建一个abc目录
#### rd:
删除一个目录
rd abc /S 递归删除abc及abc目录下的所有文件
rd abc /q 静默删除 不显示提示
#### echo
输出指令
echo abc 在当前命令窗口输出abc
#### 写入文件
echo abc>"./aa.txt" 在当前路径下创建一个aa.txt文件,并写入abc字符串
echo def>>"./aa.txt" 在aa.txt文件中追加 def字符串
#### del
删除当前路径下的一个文件
del abc.txt
/f 删除只读文件 (强制删除)
/p 带警告的删除
/q 静默模式
#### cls
清屏
#### ping
查看当前主机与目标主机的连通情况
#### ipconfig
查看当前电脑的网卡情况
# npm
npm是nodejs的包管理工具
npm可以支持:
1、将包从服务器下载到本地
2、将本地的包上传至服务器
3、将软件从服务器下载到本地
#### 初始化项目
使用 `npm init` 命令初始化一个项目,该命令会在项目根目录创建一个package.json文件。
#### 安装一个包
npm install xxx --save-dev:以开发模式安装一个xxx的包
npm install xxx --save: 以生产模式安装一个xxx的包
其中install可以简写成i --save可以简写成 -S --save-dev可以简写成-D
比如安装jquery:
npm i jquery -D
-S参数可以省略,默认以生产模式安装
#### 恢复所有依赖
npm install 或者 npm i
#### 卸载一个包
npm unistall xxx 卸载xxx这个包
#### 更新一个包
npm update xxx 更新包
#### 查看npm镜像源
npm config get registry
#### 安装nrm
nrm是一个镜像源管理工具
npm i nrm -g // 全局安装
#### 查看nrm镜像支持
nrm ls
#### 切换镜像
nrm use taobao
# yarn
yarn是npm的进阶版 但是yarn和npm不能共存 一个项目用npm就不能用yarn
#### 安装yarn
1、去官网找安装包手动安装
2、通过npm安装:
npm i yarn -g
#### 初始化项目
yarn init
#### 安装包
yarn add xxx 安装一个包
yarn add [email protected] 指定版本安装
yarn add xxx --dev 开发环境
yarn add xxx --peer 生产环境
#### 升级包
yarn upgrade xxx 更新一个包
#### 移除包
yarn remove xxx 移除/卸载一个包
#### 安装全部依赖
yarn install yarn
# cnpm
cnpm是淘宝克隆的npm,用淘宝的镜像复制了一份npm
#### 安装cnpm
npm i cnpm -g
对包管理的操作和npm一模一样
例如安装包用的是:
cnpm i jquery -S
如何把一个yarn管理的项目改成npm
1、删除yarn.lock
2、删除nodemodules目录
3、npm install 使用npm恢复项目
边栏推荐
- [translation] announce Vites 13
- Difference between soft link and hard link
- 中国信通院陈屹力:降本增效是企业云原生应用的最大价值
- [detailed explanation of key and difficult points of document operation]
- Continuous delivery and Devops are good friends
- [steering wheel] use the 60 + shortcut keys of idea to share with you, in order to improve efficiency (live template & postfix completion)
- Influence of middle tap change on ZVS oscillation circuit
- [steering wheel] use the 60 + shortcut keys of idea to share with you, in order to improve efficiency (reconstruction)
- Longest Substring Without Repeating Characters
- ShardingSphere数据分片
猜你喜欢

Self-supervised learning method to solve the inverse problem of Fokker-Planck Equation

规范自己debug的流程

Win11麦克风权限的开启方法

Extended Physics-InformedNeural Networks论文详解

Machine learning foundation plan 0-2: what is machine learning? What does it have to do with AI?
![[steering wheel] use the 60 + shortcut keys of idea to share with you, in order to improve efficiency (reconstruction)](/img/b4/62a4c06743fdedacdffd9b156a760f.png)
[steering wheel] use the 60 + shortcut keys of idea to share with you, in order to improve efficiency (reconstruction)

JS get the time composition array of two time periods
![[translation] cloud like internal load balancer for kubernetes?](/img/e5/f003ebed05a94d2936cfef5617f745.jpg)
[translation] cloud like internal load balancer for kubernetes?

1.软件测试-----软件测试的基本概念

如何有效的去防止别人穿该网站首页快照
随机推荐
File operation (I) -- File introduction and file opening and closing methods
How to design automated test cases?
这种动态规划你见过吗——状态机动态规划之股票问题(上)
(PC+WAP)织梦模板蔬菜水果类网站
Detailed explanation of extended physics informedneural networks paper
Multithreaded programming
朋友刚学完自动化测试就拿25Koffer,我功能测试何时才能到头?
FPGA_Vivado软件初次使用流程_超详细
持续交付和DevOps是一对好基友
GoLang日志编程系统
Method of manually cloning virtual machine in esxi6.7
Study notes of pytorch deep learning practice: convolutional neural network (Advanced)
The sixth day of the third question of daily Luogu
一篇文章让你理解 云原生 容器化相关
STM32 - DMA notes
Oxycon 2022 network capture frontier conference is about to open!
简单使用 MySQL 索引
Cycle and branch (I)
织梦提示你设定了字段为联动类型如何解决
Convert rich text to normal text