Courseiva
Essential Tools →hardMultiple Choice

EX200 Essential Tools Practice Question

An administrator needs to list the permissions, owner, group, and filenames of all files in /var/log, including hidden files, in a human-readable format. Which command does this?

⚠ Common exam trap

The trap here is that candidates may forget the `-a` flag for hidden files or the `-h` flag for human-readable sizes, assuming `-l` alone provides enough detail, or they might mistakenly choose `-ld` thinking it lists directory contents.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

ls -lah /var/log

`ls -lah /var/log` combines the `-l` (long format), `-a` (show all files including hidden ones), and `-h` (human-readable sizes) flags. This meets all requirements: listing permissions, owner, group, filenames, and hidden files with sizes in KiB/MiB/GiB.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    ls -lh /var/log

    Why it's wrong here

    The -l flag produces a long listing with permissions, owner, and group, and -h converts file sizes into human-readable units like KiB or MiB. However, without -a, entries whose names begin with a dot are hidden, so the output omits hidden log files and is incomplete for a full permissions audit.

  • ✗

    ls -la /var/log

    Why it's wrong here

    The -l and -a flags together list every file, including hidden dotfiles, with permissions, owner, and group in long format. But -h is absent, so sizes are shown in raw bytes rather than human-readable units, making large log files unnecessarily hard to scan at a glance.

  • ✗

    ls -ld /var/log

    Why it's wrong here

    The -d option changes ls's behavior to display information about the directory entry itself instead of its contents. Therefore, this command shows only /var/log's own permissions, owner, and group, not those of the log files and subdirectories inside it, which fails the administrator's goal.

  • ✓

    ls -lah /var/log

    Why this is correct

    Combining -l, -a, and -h gives a long-format listing of every entry in /var/log including hidden dotfiles, with sizes expressed in human-readable units. This is the only option that simultaneously provides the required permissions/owner/group data for all contents and keeps the output easily readable, meeting every part of the request.

About these practice questions

This EX200 question is part of Courseiva's 427-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.