1Z0-821 · Question #130
You have a process called bigscript, and you need to know the PID number for this process. Which command will provide that information?
The correct answer is C. pgrep bigscript. Pgrep takes a process name and return a PID. Note: pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout. All the criteria have to match. For example, pgrep -u root sshd will only list the processes called…
Question
You have a process called bigscript, and you need to know the PID number for this process. Which command will provide that information?
Options
- Apkill bigscript
- Bps bigscript
- Cpgrep bigscript
- Dprstat bigscript
How the community answered
(28 responses)- A11% (3)
- B14% (4)
- C71% (20)
- D4% (1)
Explanation
Pgrep takes a process name and return a PID. Note: pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout. All the criteria have to match. For example, pgrep -u root sshd will only list the processes called sshd AND owned by root. Incorrec answers: ps bigscript: You can't pass a name to ps, it interprets it as arguments.
Topics
Community Discussion
No community discussion yet for this question.