List files sorted by modification time

See the most recently changed files at the top of the listing.

LinuxlistingtimestampsLow risk
Run ls -lht to list files newest first with human-readable sizes; add | head to show only the top few.

01Command

Command
$ ls -lht && ls -lht | head -15

02What it does

ls -t sorts by modification time, newest first — combined with -l for details and -h for readable sizes it answers 'what did I just change here?'. Reverse the order with -r (ls -lhtr) for oldest first, which is handy for logs.

03Risk

RiskLow risk
!Warning: Note that mtime changes on content edits, not on permission changes or renaming. Also, in most shells plain ls already shows new-to-old in some setups — use ls -lt explicitly to be sure.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ls(1) — Linux manual page
    man7.org · community · 2026-09-17
    Evidence: ls -l uses long listing format, -t sorts by modification time (newest first by default), and -h prints human-readable sizes.

Last verified: 2026-09-18 · Category: Files & Folders

06Related solutions