当前位置:网站首页>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恢复项目
边栏推荐
- Shardingsphere data slicing
- VR panoramic shooting and production of business center helps businesses effectively attract people
- Win11大小写提示图标怎么关闭?Win11大小写提示图标的关闭方法
- ES6 advanced - using prototype object inheritance methods
- After clicking play, the variables in editorwindow will be destroyed inexplicably
- 1. Software testing ----- the basic concept of software testing
- [sql] usage of self connection
- 文件操作(一)——文件简介与文件的打开方式和关闭
- Arthas view the source code of the loaded class (JAD)
- (pc+wap) dream weaving template vegetable and fruit websites
猜你喜欢

Arthas' dynamic load class (retransform)

Win11更改磁盘驱动器号的方法

FPGA_ Initial use process of vivado software_ Ultra detailed

MySQL build websites data table

Swin Transformer【Backbone】

Personally test five efficient and practical ways to get rid of orders, and quickly collect them to help you quickly find high-quality objects!

ES6 advanced - inherit parent class attributes with constructors

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

Binary search 33. search rotation sort array

JS get the time composition array of two time periods
随机推荐
[sql] usage of self connection
Extended Physics-InformedNeural Networks论文详解
[introduction to C language] zzulioj 1006-1010
这种动态规划你见过吗——状态机动态规划之股票问题(上)
中国信通院陈屹力:降本增效是企业云原生应用的最大价值
c语言分层理解(c语言函数)
.net serialize enumeration as string
图像识别(七)| 池化层是什么?有什么作用?
MySQL教程:MySQL数据库学习宝典(从入门到精通)
1. Software testing ----- the basic concept of software testing
Pbootcms upload thumbnail size automatically reduces and blurs
Oxycon 2022 network capture frontier conference is about to open!
当点击Play以后,EditorWindow中的变量会被莫名其妙销毁.
Golang 中‘...‘的用法
How to speed up matrix multiplication
AMD64(x86_64)架构abi文档:中
[steering wheel] use the 60 + shortcut keys of idea to share with you, in order to improve efficiency (live template & postfix completion)
Self-supervised learning method to solve the inverse problem of Fokker-Planck Equation
从各大APP年度报告看用户画像——标签,比你更懂你自己
Image recognition (VI) | activation function