1、找出"netstat -tan”命令的结果中,以‘LISTEN’后跟0或多个空白字符结尾的行
2、在/etc/fstab文件中不以#开头的行的行首增加#号
3、删除/etc/fstab文件中所有以#开头的#字符
1、
[root@localhost ~]# netstat -tan | grep -E 'LISTEN\s*$'
2、
[root@localhost ~]# sed -r 's/^[^\#]/#&/' /etc/fstab
3、
[root@localhost ~]# sed '/#*/d' /etc/fstab