CompTIA Linux+ (XK0-005) — Question 172

A systems administrator wants to list all local accounts in which the UID is greater than 500. Which of the following commands will give the correct output?

Answer options

Correct answer: C

Explanation

The correct answer is C because the awk command correctly filters users by UID and prints the usernames. Option A is incorrect as it uses 'find' which is not suitable for this purpose. Option B is wrong because 'cut' does not filter based on UID values. Option D is invalid since 'sed' is not designed to filter UIDs in this manner.