CompTIA Linux+ Powered by LPI (LX0-103) — Question 17
Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose
TWO correct answers.)
Answer options
- A. find /tmp -uid root -print
- B. find -path /tmp -uid root
- C. find /tmp -user root -print
- D. find /tmp -user root
- E. find -path /tmp -user root –print
Correct answer: C, D
Explanation
The correct answers are C and D because they correctly utilize the '-user' option to find files owned by 'root' in the specified directory. Option A uses '-uid' which is valid but not the most common usage, while B and E have incorrect command structures that don't fulfill the requirement of printing the results.