脚本宝典收集整理的这篇文章主要介绍了ubuntu 下部署 node 服务器环境 - 番外(bash | vim | chmod),脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
附录
-
bash
操作
-
vim
操作
-
http
状态码
-
chmod
权限
bash
ls
ls -a
ll
ll -a
@H_126_57@cd
cd .
cd ..
cd /
cd /etc
cd ~/.ssh
mkdir # new dir
touch # new file
cat #查看文件
mv file1 file2 #move
cp file1 file2 #copy file1 -> file2
pwd # PRint working directory
whoami # who am i
rm file1 #remove
rm -rf file2
-d --directory #删除可能仍有数据的目录 (只限超级用户)
-f --force #强制删除,无需确认。单独使用时不能删除dir
-r/R --recursive #同时操作该目录下的所有目录层
-i --interactive #删除前确认
tar zcvf test.tar.gz test #压缩
tar xvf test.tar.gz #解压
-c #压缩
-x #解压
-f #写在最后
-v #压缩中显示文件
-z #同时具有 gzip 属性
scp patha pathb #上传
> #覆盖
>> #追加
Vim
vi #打开 || 创建
i #编辑状态
Esc #退出编辑状态
wq! #保存退出
q! #退出
http
状态码
100 // 建立连接,请继续发送信息~
200 // OK
301 // Moved PErmanently (永久移除)
302 // Found (暂时移除)
304 // Not Modified
400 // Bad Request (请求无效)
401 // Unauthorized (未授权)
403 // Forbidden (禁止访问)
404 // Not found (缓存资源是最新的)
500 // internal service error (内部服务器错误)
502 // bad gateway (网关故障)
504 // gateway timeout error (网关超时)
chmod
权限
由 3
位数字组成,每一位数字都代表 3
种权限(读、写、操作)
1 所有者权限
2 同组用户权限
3 其他用户权限
0 无
1 可执行
2 可写
4 可读
3 2+1 写 & 执行
5 4+1 读 & 执行
6 4+2 读 & 写
7 4+2+1 读 & 写 & 执行
顶级权限 777
: 任何用户均可 读写执行 chmod 777 filename
举个栗子 600
: 所有者可读写,同组和其他用户无权限
完
以上是脚本宝典为你收集整理的ubuntu 下部署 node 服务器环境 - 番外(bash | vim | chmod)全部内容,希望文章能够帮你解决ubuntu 下部署 node 服务器环境 - 番外(bash | vim | chmod)所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。