运维实记linuxlinux tools

(基础命令)Linux运维之道

2019-01-23  本文已影响31人  SkTj

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

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


image.png

--
pv vg lv
rpm -Va


image.png

systemctl list-unit-files|grep enabled

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

,%,/

//


image.png
image.png

正则


image.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,


image.png
sed -n "/a/,/b/p" file

awk '/^/ {print "Blank line"}' file awk 'NR==2{print0}' installer.sh
NR,NF,FS,OFS

image.png
gsub,sub
image.png
length()

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


image.png
上一篇 下一篇

猜你喜欢

热点阅读