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:
Step 1: Understand options needed
'-a' shows all files including hidden, '-t' sorts by modification time.
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.
Final Answer:
ls -a -t -> Option A
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
Master "Linux Basics and Terminal" in Linux CLI
9 interactive learning modes - each teaches the same concept differently