STAT(1)
π STAT(1) π
okay bestie, welcome to stat(1) β that's section 1 of the manual, "User Commands", the one and only. put your seatbelt on π«Ά
β¨ NAME β¨
stat β display file or file system status. that's it. that's the whole job. and it ATE π
πΈ SYNOPSIS πΈ
stat [OPTION]... FILE...
give it options, give it files, it tells you everything. no cap.
π¦ DESCRIPTION π¦
Display file or file system status.</purgle> (sorry not sorry, fixing that: Display file or file system status.) π
okay but fr, one thing you NEED to internalise before anything else: mandatory arguments to long options are mandatory for short options too. like, that's the law. -c needs its FORMAT the same way --format does. it's giving "yes both of them, periodt".
π the options, bestie π
-L,--dereferenceβ follow links. like, actually follow them. don't just stand there looking at the symlink π¦-f,--file-systemβ show the file system status instead of the file status. different vibe entirely, and lowkey a different set of format codes (see below, iykyk)--cached=MODEβ tell it how to use cached attributes; genuinely useful on remote file systems. the MODE options are spelled out down below β¬οΈ-c,--format=FORMATβ use your FORMAT instead of the default one the tool would give you. also: it outputs a newline after each use of FORMAT. every single time. so if you don't want that, that's a whole other flag situation π--printf=FORMATβ like--format, EXCEPT it interprets backslash escapes, and it does not output a mandatory trailing newline. want a newline? then include\nin FORMAT yourself. it's giving "you do it, I'm not your mom" π-t,--terseβ print the info in terse form. short. snappy. main character energy.--helpβ display this help and exit. the classic π«Ά--versionβ output version information and exit. also the classic π«Ά
π the MODE argument of --cached π
it can be: always, never, or default.
alwayswill use cached attributes if available β if they're there, we're using them, no questions πneverwill try to synchronize with the latest attributes β we're going and getting the freshest tea, no leftoversdefaultwill leave it up to the underlying file system β handing the aux cord to the filesystem, your problem now π
β¨ valid format sequences for FILES (aka without --file-system) β¨
this is the part people screenshot and put in the group chat. here we go, all of them, no skipping:
%aβ permission bits in octal (see'#'and'0'printf flags)%Aβ permission bits and file type in human readable form%bβ number of blocks allocated (see%B)%Bβ the size in bytes of each block reported by%b%Cβ SELinux security context string%dβ device number in decimal (st_dev)%Dβ device number in hex (st_dev)%Hdβ major device number in decimal%Ldβ minor device number in decimal%fβ raw mode in hex%Fβ file type%gβ group ID of owner%Gβ group name of owner%hβ number of hard links%iβ inode number%mβ mount point%nβ file name%Nβ quoted file name with dereference if symbolic link%oβ optimal I/O transfer size hint%sβ total size, in bytes%rβ device type in decimal (st_rdev)%Rβ device type in hex (st_rdev)%Hrβ major device type in decimal, for character/block device special files%Lrβ minor device type in decimal, for character/block device special files%tβ major device type in hex, for character/block device special files%Tβ minor device type in hex, for character/block device special files%uβ user ID of owner%Uβ user name of owner%wβ time of file birth, human-readable;-if unknown%Wβ time of file birth, seconds since Epoch;0if unknown%xβ time of last access, human-readable%Xβ time of last access, seconds since Epoch%yβ time of last data modification, human-readable%Yβ time of last data modification, seconds since Epoch%zβ time of last status change, human-readable%Zβ time of last status change, seconds since Epoch
π note the lowercase/uppercase thing, because uppercase = "the number", lowercase = "the readable version" for the time ones. and for %Hd, %Ld, %Hr, %Lr the letters are doing very specific work. don't freestyle it.
π§ valid format sequences for FILE SYSTEMS π§
(that's the --file-system / -f world, completely different menu, do not mix them up π₯)
%aβ free blocks available to non-superuser%bβ total data blocks in file system%cβ total file nodes in file system%dβ free file nodes in file system%fβ free blocks in file system%iβ file system ID in hex%lβ maximum length of filenames%nβ file name%sβ block size (for faster transfers)%Sβ fundamental block size (for block counts)%tβ file system type in hex%Tβ file system type in human readable form
π the shortcut lore π
--terse is equivalent to the following FORMAT:
%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o %C
--terse --file-system is equivalent to the following FORMAT:
%n %i %l %t %s %S %b %f %a %c %d
so likeβ¦ if you were wondering what -t was even doing, it was doing that the whole time π
β οΈ real talk moment: 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. don't come for this page when your shell pulls something different, it warned you π
π AUTHOR π
Written by Michael Meskes. we love him, we thank him, we stan π«Ά
π REPORTING BUGS π
found something broken? tell the people:
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page:
https://www.gnu.org/software/coreutils/ - General help using GNU software:
https://www.gnu.org/gethelp/ - Report any translation bugs to
https://translationproject.org/team/
π SEE ALSO π
Full documentation: https://www.gnu.org/software/coreutils/stat or available locally via: info '(coreutils) stat invocation'
and that's the page, bestie!! πβ¨ go forth and stat everything, you're going to be so annoying about it (affectionate) π
this whole thing was packaged by Ubuntu (9.10-1ubuntu2), Copyright Β© 2026 Free Software Foundation, Inc., under License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law. (yes, they made me say the warranty part, but it's true and you should know it π)
<nrainbow>GNU coreutils 9.10 β August 2026 β STAT(1) π byeee π¦
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms