Bird
0
0

You want to list all files in the directory /var/log sorted by modification time, newest first, including hidden files. Which command should you use?

hard📝 Application Q15 of 15
Linux CLI - Navigating the File System
You want to list all files in the directory /var/log sorted by modification time, newest first, including hidden files. Which command should you use?
Als -lat /var/log
Bls -ltr /var/log
Cls -al /var/log
Dls -lh /var/log
Step-by-Step Solution
Solution:
  1. Step 1: Identify options needed

    -a shows hidden files, -t sorts by modification time, newest first, and -l gives detailed listing.
  2. Step 2: Match options to command

    Only ls -lat /var/log combines all needed options correctly.
  3. Final Answer:

    ls -lat /var/log -> Option A
  4. Quick Check:

    -lat = list all, sort by time [OK]
Quick Trick: Use -lat to list all files sorted by time [OK]
Common Mistakes:
  • Using -ltr which sorts oldest first
  • Forgetting -a to show hidden files
  • Using -lh which shows size but not sorting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes