CompTIA Linux+ XK0-006 (V8) Practice Question

You are troubleshooting an authentication system. The file /var/log/auth_users.log contains one username per line, but the list has never been sorted and includes mixed-case duplicates (for example, "admin", "ADMIN", and "Admin"). You need a one-liner that will:

  • treat lines that differ only by case as identical
  • show each distinct username once, preceded by the number of times it appears
  • display the result from the most frequent name to the least

Which pipeline meets all of these requirements?

  • sort -f /var/log/auth_users.log | uniq -ci | sort -nr

  • awk '{print tolower($0)}' /var/log/auth_users.log | sort -u | wc -l

  • sort /var/log/auth_users.log | uniq -d | sort -n

  • uniq -ci /var/log/auth_users.log | sort -nr

CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot