List files sorted by modification time
See the most recently changed files at the top of the listing.
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 -1502What 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
!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 pageEvidence: 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
View Directories as a Tree with tree
tree prints an indented hierarchy of a directory, with depth limits, hidden files, and size options.
Inspect File Metadata with stat
stat shows the full file status: the three timestamps (atime/mtime/ctime), inode number, and permission bits in both octal and rwx form.