stat - display file or file system status


stat [OPTION] FILE...


Display file or file system status.

-L, --dereference
follow links
-f, --file-system
display file system status instead of file status
-c --format=FORMAT
use the specified FORMAT instead of the default; output a newline after each use of FORMAT
like --format, but interpret backslash escapes, and do not output a mandatory trailing newline. If you want a newline, include \n in FORMAT.
-t, --terse
print the information in terse form
display this help and exit
output version information and exit

The valid format sequences for files (without --file-system):

Access rights in octal
Access rights in human readable form
Number of blocks allocated (see %B)
The size in bytes of each block reported by %b
Device number in decimal
Device number in hex
Raw mode in hex
File type
Group ID of owner
Group name of owner
Number of hard links
Inode number
File name
Quoted file name with dereference if symbolic link
I/O block size
Total size, in bytes
Major device type in hex
Minor device type in hex
User ID of owner
User name of owner
Time of last access
Time of last access as seconds since Epoch
Time of last modification
Time of last modification as seconds since Epoch
Time of last change
Time of last change as seconds since Epoch

Valid format sequences for file systems:

Free blocks available to non-superuser
Total data blocks in file system
Total file nodes in file system
Free file nodes in file system
Free blocks in file system
File System ID in hex
Maximum length of filenames
File name
Block size (for faster transfers)
Fundamental block size (for block counts)
Type in hex
Type in human readable form

NOTE: your shell may have its own version of stat, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports.


Written by Michael Meskes.


Report bugs to <>. Copyright © 2007 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <>. There is NO WARRANTY, to the extent permitted by law.



The full documentation for stat is maintained as a Texinfo manual. If the info and stat programs are properly installed at your site, the command

info stat

should give you access to the complete manual.