Courseiva
easyMultiple ChoiceObjective-mapped

220-1102 Practice Question: A junior admin needs to list all files in the…

A junior admin needs to list all files in the current directory, including hidden files, with detailed information such as permissions, owner, and size. Which command should they use?

⚠ Common exam trap

A common mistake is to think that either `ls -l` (shows details but not hidden files) or `ls -a` (shows hidden files but no details) is sufficient. The correct answer is `ls -la` which combines both options.

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 -la

The `ls -la` command combines the `-l` (long format) and `-a` (all files, including hidden ones) options. This fulfills the requirement to list all files in the current directory, including hidden files (those starting with a dot), with detailed information such as permissions, owner, group, size, and modification time.

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 -l

    Why it's wrong here

    This command displays files and directories in a detailed "long format," providing information such as file permissions, owner, group, size, and last modification date. However, by default, `ls -l` adheres to the Unix convention of omitting files and directories whose names begin with a dot (`.`), which are considered hidden. Therefore, it fails to list *all* files as required, specifically excluding configuration files and other system dotfiles.

  • ls -a

    Why it's wrong here

    The `ls -a` command is designed to list *all* files and directories, including the conventionally hidden ones that start with a dot (`.`), such as `.bashrc` or `.config`. While it successfully addresses the "all files" aspect of the requirement, it presents them in a simple, unformatted list without any detailed information like permissions, ownership, or file size. This lack of "long format" details makes it insufficient for a comprehensive administrative review.

  • ls -la

    Why this is correct

    This command correctly combines the `-l` (long format) and `-a` (all files) options, providing a complete and detailed listing. `ls -la` displays comprehensive information for every file and directory, including permissions, number of links, owner, group, size, and last modification timestamp, even for those conventionally hidden by a leading dot. This combination fully satisfies the requirement to list all files with detailed attributes.

  • ll

    Why it's wrong here

    The `ll` command is not a standard POSIX utility but rather a common shell alias, typically configured to execute `ls -l` on many Linux distributions. While it provides a convenient shorthand for a long format listing, its underlying behavior is identical to `ls -l`. Consequently, `ll` will not display files or directories that begin with a dot, failing to meet the requirement to list *all* files, including hidden ones. Its reliance on aliases also makes it less portable and predictable across different system environments.

About these practice questions

Courseiva writes every 220-1202 question from scratch — 495 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 220-1202 practice question is part of Courseiva's free CompTIA 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 220-1202 exam.