需要一条命令将/etc/ssh/ sshd_congfig中的8888改为888888并保存
nl /etc/ssh/ sshd_congfig | sed -n '/8888/{s/8888/8888888/;p;wq!}'
sed -i 's/8888/8888888/g' ./etc/ssh/ sshd_congfig ;wq!
wq是干啥的,你用sed替换又不是用vim编辑,删了
sed -i 's/8888/8888888/g' ./etc/ssh/ sshd_congfig
就这一句就够用了,其他的都没用
同上
sed -i 's/8888/8888888/g' ./etc/ssh/ sshd_congfig
1.touch test.txt 新增文本文件,