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.

LinuxmetadatastattimestampsLow risk
Run `stat file.txt` to display a file's timestamps, inode, size, and permissions.

01Command

Command
$ stat file.txt

02What it does

The trio people confuse: Access = last read, Modify = last content change, Change = last metadata change (permissions, ownership, or content). Use `stat -c '%y %n' *` for a script-friendly one-line-per-file format, or `stat -c '%a' file` to get just the octal permissions — handy when reproducing chmod values elsewhere.

03Risk

RiskLow risk
Requirementscoreutils (default)

04Undo

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

05Sources

  • stat(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: stat displays file status including size, blocks, inode, permissions, and Access/Modify/Change timestamps; -c allows a custom output format.

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