Bird
0
0

What does the ls -a command show when run in a directory?

easy📝 Conceptual Q1 of 15
Linux CLI - Navigating the File System
What does the ls -a command show when run in a directory?
AFiles sorted by size
BOnly files modified today
CAll files including hidden files starting with a dot
DOnly directories inside the current directory
Step-by-Step Solution
Solution:
  1. Step 1: Understand the -a option in ls

    The -a option tells ls to show all files, including hidden ones that start with a dot.
  2. Step 2: Compare with other options

    Other options like sorting by size or filtering by modification date are not done by -a.
  3. Final Answer:

    All files including hidden files starting with a dot -> Option C
  4. Quick Check:

    ls -a = Show all files [OK]
Quick Trick: Use -a to see hidden files starting with dot [OK]
Common Mistakes:
  • Thinking -a shows only directories
  • Confusing -a with -l
  • Assuming it filters by date

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes