grep不显示本身进程
无需传统意义上的 grep xx|grep -v grep ……
- [root@Centos ~]# ps aux|grep ssh
- root 1959 0.0 0.2 7076 1064 ? Ss Oct02 0:00 /usr/sbin/sshd
- root 5812 0.0 0.1 3920 688 pts/1 R+ 15:30 0:00 grep ssh
- root 18278 0.0 0.5 10076 2912 ? Ss Oct06 0:18 sshd: root@pts/1
- [root@Centos ~]# ps aux|grep \[s]sh
- root 1959 0.0 0.2 7076 1064 ? Ss Oct02 0:00 /usr/sbin/sshd
- root 18278 0.0 0.5 10076 2912 ? Ss Oct06 0:18 sshd: root@pts/1