In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what is the use of the pgrep command in Linux. I hope you will get something after reading this article. Let's discuss it together.
The Linux common command pgrep command looks up the process from the running process queue by name and displays the process id found.
According to the information given by the user, pgrep finds and lists the eligible processes ID (PID) in the currently running process.
Add that each process ID is represented by a decimal number, separated by a split string from the next ID, and the default split string is a new line. For each attribute option, the user can specify a collection of possible values separated by commas on the command line.
Syntax pgrep (option) (parameter) option-o: displays only the minimum (start) process number found;-n: displays only the maximum (end) process number found;-l: displays the process name;-P: specifies the parent process number;-g: specifies the process group;-t: specifies the terminal that starts the process;-u: specifies the valid user ID of the process. Parameter process name: specifies the name of the process to look for, and also supports matching patterns similar to those in the grep directive.
Example pgrep-lo httpd 4557 httpd [root@localhost ~] # pgrep-ln httpd 4566 httpd [root@localhost ~] # pgrep-l httpd 4557 httpd 4560 httpd 4561 httpd 4562 httpd 4563 httpd 4564 httpd 4565 httpd 4566 httpd [root@localhost ~] # pgrep httpd 45604561,4563,4564,654566 after reading this article, I believe you have a certain understanding of "what is the use of pgrep commands in Linux". If you want to know more related knowledge, welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.