Name

stat

Synopsis

stat filename [filenames . . . ]

Description

Print out the contents of an inode as they appear to the stat system call in a human-readable format. The error messages “Can’t stat file” or “Can’t lstat file” usually mean the file doesn’t exist. “Can’t readlink file” generally indicates that something is wrong with a symbolic link.

Output

Sample output from the command:

                     stat /
  File: "/"
  Size: 1024         Filetype: Directory
  Mode: (0755/drwxr-xr-x)  Uid: (  0/  root) Gid: (  0/  system)
Device: 3,3   Inode: 2        Links: 21
Access: Tue Apr 11 04:02:01 2000(00000.11:47:35)
Modify: Wed Nov 17 11:46:38 1999(00146.03:02:58)
Change: Wed Nov 17 11:46:38 1999(00146.03:02:58)

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.