sed -i '1,/PermitRootLogin/{/PermitRootLogin/c\
PermitRootLogin yes
}' /etc/ssh/sshd_config
只替换一次
sed -i '/^str/s/^/add/' t.sh
查找以str开头的行,并在行首插入add
sed -i '/libphp5/s/^/#/' /www/wdlinux/apache/conf/httpd.conf
Submitted by admin on 2010, December 15, 4:40 PM. sed
sed -i '1,/PermitRootLogin/{/PermitRootLogin/c\
PermitRootLogin yes
}' /etc/ssh/sshd_config
只替换一次
sed -i '/^str/s/^/add/' t.sh
查找以str开头的行,并在行首插入add
sed -i '/libphp5/s/^/#/' /www/wdlinux/apache/conf/httpd.conf
« 2025年05月 » | ||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |