Courseiva
Essential Commands →mediumMultiple Choice

LFCS Essential Commands Practice Question

A system administrator needs to list all files in the current directory, including hidden files, in a long listing format sorted by modification time (oldest first). Which command achieves this?

⚠ Common exam trap

The trap here is that candidates often remember `-lt` for time-sorted listing but forget that `-a` is required to include hidden files, or they confuse the order and omit `-r` to reverse to oldest first.

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

`ls -lart` combines the `-l` (long listing), `-a` (include hidden files starting with dot), `-r` (reverse order), and `-t` (sort by modification time, newest first). The reverse flag flips the sort to oldest first, meeting the requirement exactly.

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

    Why it's wrong here

    Includes inode and human-readable but missing -t, sorts by name.

  • ✓

    ls -lart

    Why this is correct

    Correct: long, all, reverse, time.

  • ✗

    ls -lat

    Why it's wrong here

    The -t flag sorts newest first, so -lat reverses the required oldest-first order; -r is missing. It is tempting because -lat does list hidden files in long format with timestamps, which suits finding recently changed files, but the stem explicitly demands oldest first.

  • ✗

    ls -lrt

    Why it's wrong here

    Lacks -a, so hidden files not shown.

About these practice questions

Courseiva writes every LFCS question from scratch — 406 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 LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.