You have a process called bigscript, and you need to know the PID number for this process. Which command will provide that information?
Answer options:
A. pkill bigscript
B. ps bigscript
C. pgrep bigscript
D. prstat bigscript
Answer correct:
C
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 cant pass a name to ps, it interprets it as arguments.