exam questions

Exam 101-500 All Questions

View all questions & answers for the 101-500 exam

Exam 101-500 topic 1 question 91 discussion

Actual exam question from LPI's 101-500
Question #: 91
Topic #: 1
[All 101-500 Questions]

Which of the following commands display the IDs of all processes owned by root? (Choose two.)

  • A. pgrep -c root
  • B. pgrep -u root
  • C. pgrep -f root
  • D. pgrep -U 0
  • E. pgrep -c 0
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linder
Highly Voted 2 years, 10 months ago
I think it's B and D
upvoted 37 times
wvdw1962
1 year, 2 months ago
tried it on Fedora 35: its B and D
upvoted 2 times
...
cast7omadrid1
2 years, 10 months ago
You are right, I have tried it and it is correct.
upvoted 16 times
...
...
mikebd
Highly Voted 2 years, 8 months ago
There are a quite a few mistakes on this site :D And however they have generated the questions needs a bit of work, things like - and "" are not handled correctly ....
upvoted 11 times
...
Lollosbrollo
Most Recent 8 months, 2 weeks ago
Selected Answer: BD
B and D
upvoted 3 times
...
Lazylinux
10 months, 3 weeks ago
Selected Answer: BD
Tested all good
upvoted 1 times
...
anhcq
1 year, 3 months ago
Selected Answer: BD
Tried, B and D are correct
upvoted 1 times
...
iwkno6
1 year, 7 months ago
Agree with B & D
upvoted 2 times
...
CuriousLinuxCat
1 year, 7 months ago
Correct Answer: BD B is correct because it specifies user of 'root' with -u. D is correct because it matches 'real user ID' with uid of 0 (which I assume is the default.) What is the real user ID? Who you really are (the person who owns the proess). A unique number for a user in the system. What is pgrep? Look at running processes and lists the process ID to STDOUT. For example: pgrep -u root sshd Will only list the process ID's that are owned by root (user). Example 2: pgrep -u user -l Will list the process ID and name used by 'user'. -c count -u user -l list process name as will as process ID
upvoted 5 times
...
Bodescu
1 year, 9 months ago
B&D get the point. Verified :) (To whom is validating our comments... Please tell whoever may care, to do his/ her the f job and do correct the tests: Who wants to purchase anything full of mistakes? TY xD )
upvoted 3 times
...
penguinx64
2 years ago
-U makes sense, but -f does not -U, --uid uid,... Only match processes whose real user ID is listed. Either the numerical or symbolical value may be used. -f, --full The pattern is normally only matched against the process name. When -f is set, the full command line is used.
upvoted 3 times
...
Malvada
2 years, 3 months ago
Also checked this, its B & D
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago