Bird
0
0

You want to list all files in a directory including hidden ones, sorted by modification time. Which command should you use?

hard📝 Application Q15 of 15
Linux CLI - Linux Basics and Terminal
You want to list all files in a directory including hidden ones, sorted by modification time. Which command should you use?
Als -a -t
Bls -l -h
Cls -r -S
Dls -d .*
Step-by-Step Solution
Solution:
  1. Step 1: Understand options needed

    '-a' shows all files including hidden, '-t' sorts by modification time.
  2. Step 2: Evaluate each option

    A: 'ls -r -S' reverses and sorts by size (no hidden). B: 'ls -l -h' long format with human sizes (no hidden, no time sort). C: 'ls -a -t' shows all including hidden, sorted by mod time. D: 'ls -d .*' shows only dot entries.
  3. Final Answer:

    ls -a -t -> Option A
  4. Quick Check:

    Show hidden + sort by time = ls -a -t [OK]
Quick Trick: Use -a for hidden, -t for time sort [OK]
Common Mistakes:
  • Using -l instead of -a to show hidden
  • Confusing -S (size) with -t (time)
  • Using -d .* lists only hidden files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes