(基础命令)Linux运维之道
2019-01-23 本文已影响31人
SkTj
自动安装系统:PXE+kickstart :http://blog.51cto.com/12643266/2344023
解压:
![](https://img.haomeiwen.com/i9967595/8a5e84a6de9042bd.png)
vim 替换
![](https://img.haomeiwen.com/i9967595/c2d954f7acadec4a.png)
显示行号: :set nu
:!ls
useradd -d /home
-g -G -s /sbin/nologin -u
groupadd -g 1000 jerry
passwd -l -u -d:清空密码
usermod -e 修改失效日期
chmod ugoa
{a,b,c}
getfacl file
![](https://img.haomeiwen.com/i9967595/d46f5dcc19efcf80.png)
--
pv vg lv
rpm -Va
![](https://img.haomeiwen.com/i9967595/042a2efd25567ab1.png)
systemctl list-unit-files|grep enabled
![](https://img.haomeiwen.com/i9967595/73d58e78106a3245.png)
--
netstat -s 输出统计信息
top -d 2
route add
route del
nslookup www.xxx
file-max: 所有进程可以打开的总文件数
echo {0..10}
echo $((1+2))
read
,%,/
//
![](https://img.haomeiwen.com/i9967595/08f9bfda6b22c52e.png)
![](https://img.haomeiwen.com/i9967595/72a9bdfefd3be322.png)
正则
![](https://img.haomeiwen.com/i9967595/a821a6f6f3b1fbdf.png)
扩展
![](https://img.haomeiwen.com/i9967595/da85534fdb435c20.png)
--
sed
sed '2a xxx' file
sed '3i xxx' file
sed 's/a/b/g' file
sed '3,5d' file
sed '/ond/a xxx' file
sed '/^aa/d' file
sed -e "s" -e "a" file
sed -n '1~2p' installer.sh
s,d,a,i,p,
![](https://img.haomeiwen.com/i9967595/712e1555c40165e4.png)
sed -n "/a/,/b/p" file
awk '/^0}' installer.sh
NR,NF,FS,OFS
![](https://img.haomeiwen.com/i9967595/8c5e18848c5b05fe.png)
gsub,sub
![](https://img.haomeiwen.com/i9967595/22d5f43b21f8b502.png)
length()
sort -k1,1n
case $aa in
start)
xx
;;
stop)
xx
;;
restart)
esca
--
for i in {1..9}
![](https://img.haomeiwen.com/i9967595/8468a81c070d0f0b.png)