[关闭]
@zhouyy 2018-06-21T06:11:25.000000Z 字数 355 阅读 1000

linux cmd

linux tool


添加环境变量

  1. vi /etc/profile

shift i

  1. //最后一行加入
  2. export PATH=$PATH:/usr/../../bin

Esc :wq

  1. source /etc/profile

查看centos版本

  1. cat /etc/redhat-release

复制

  1. cp -R /from/ /to/

查看当前目录

  1. pwd

自动给grep命令添加颜色

  1. grep --color "test" test.json
  1. vim ~/.bashrc
  2. alias grep='grep --color'
  3. source ~/.bashrc

变成

  1. grep "test" test.json

Vi 查找替换

  1. / #查找

https://blog.csdn.net/doubleface999/article/details/55798741

  1. :%s/old/new/
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注