linux ps -ef|grep 命令显示特定进程信息
ps -ef|grep
ps命令
Process Status的缩写,是常用的进程查看命令
参数含义:
-e 显示所有进程
-f 全格式
ps -ef即以全格式显示所有进程
“|”命令
管道命令,需要接收前一个命令的输出,作为下一个命令的输入,可用于在命令行中同时执行多条命令。
grep命令
(global search regular expression(RE) and print out the line)
全面搜索正则表达式并把行打印出来,是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来
因此ps -ef以全格式显示所有进程信息,通过管道“|"输出到grep, grep再从中查找特定进程信息并打印出来
组合使用即可以全格式显示特定进程信息
如ps -ef |grep scp 以全格式显示scp命令的进程信息
关于ps命令的详细总结,参考
https://www.cnblogs.com/peida/archive/2012/12/19/2824418.html
The purview of science grows rapidly with time. It is the responsibility of each generation to join new insights to old wisdom, and to distill the key ideas for the next generation --James P. Sethna