Under normal circumstances, if we want to view some processes of Linux, it is natural to use the following command:
ps -ef | grep xxx
ps: process show display process
Parameters:
1, e Display all programs.
2. f Display UID, PPIP, C and STIME fields
grep: global search regular expression (RE) and print out the line Global regular expression matches and outputs.
The grep command is used to find strings that meet the conditions in the file.
Example:
In the current directory, find the file containing the test string in the file with the word file suffixed, and print out the line of the string. At this time, you can use the following command:
grep test *file
Recommended tutorial: linux tutorial
The above is the detailed content of How to check the process through grep command under linux. For more information, please follow other related articles on the PHP Chinese website!