"grep -v grep"
为了去除包含grep的进程行 ,避免影响最终数据的正确性,例如:
[root@lee000 conf]# ps -aux | grep 'metastore'
root 3925 0.0 0.0 112640 960 pts/0 S+ 12:39 0:00 grep --color=auto metastore
[root@lee000 conf]# ps -ef | grep 'metastore' | grep -v grep
[root@lee000 conf]#
grep --help
-v, --invert-match select non-matching lines