(基础命令)Linux运维之道

自动安装系统:PXE+kickstart :http://blog.51cto.com/12643266/2344023
解压:

9967595-8a5e84a6de9042bd.png
image.png

vim 替换
9967595-c2d954f7acadec4a.png
image.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


9967595-d46f5dcc19efcf80.png
image.png

--
pv vg lv
rpm -Va


9967595-042a2efd25567ab1.png
image.png

systemctl list-unit-files|grep enabled

9967595-73d58e78106a3245.png
image.png

--
netstat -s 输出统计信息
top -d 2
route add
route del
nslookup www.xxx
file-max: 所有进程可以打开的总文件数
echo {0..10}
echo $((1+2))
read

,%,/

//


9967595-08f9bfda6b22c52e.png
image.png

9967595-72a9bdfefd3be322.png
image.png

正则


9967595-a821a6f6f3b1fbdf.png
image.png

扩展
9967595-da85534fdb435c20.png
image.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,


9967595-712e1555c40165e4.png
image.png

sed -n "/a/,/b/p" file

awk '/^0}' installer.sh
NR,NF,FS,OFS

9967595-8c5e18848c5b05fe.png
image.png

gsub,sub
9967595-22d5f43b21f8b502.png
image.png

length()


sort -k1,1n
case $aa in
start)
xx
;;
stop)
xx
;;
restart)
esca
--
for i in {1..9}


9967595-8468a81c070d0f0b.png
image.png

猜你喜欢

转载自blog.csdn.net/weixin_34159110/article/details/87504138