STAT(1)

πŸ’– STAT(1) πŸ’– β€” or, "bestie, let me tell you everything about this file" ✨

okay so you know how sometimes you just need to know everything about a file? like its whole lore? that's this. it's stat, from the General Commands Manual, and it's giving main character energy fr fr 🫢


🌸 NAME 🌸

stat β€” Display file or file system status. πŸ’…


✨ SYNOPSIS ✨

stat [OPTION]... FILE...

πŸ¦‹ DESCRIPTION πŸ¦‹

Display file or file system status. that's it, that's the whole vibe. she shows you the receipts on your files AND your file systems. no cap. πŸ’–


πŸŽ€ OPTIONS πŸŽ€

  • -L, --dereference β€” follow links πŸ‡ (yes, literally, she goes down the rabbit hole instead of just pointing at the door)
  • -f, --file-system β€” display file system status instead of file status. so instead of the file's tea, you get the whole filesystem's tea 🍡
  • -t, --terse β€” print the information in terse form. short queen. minimal words, maximum data βœ‚οΈ
  • -c, --format <FORMAT> β€” use the specified FORMAT instead of the default; and heads up bestie, output a newline after each use of FORMAT 🌈
  • --printf <FORMAT> β€” like --format, but interpret backslash escapes, and do not output a mandatory trailing newline; if you want a newline, include \n in FORMAT. she's ✨unhinged✨ like that, you gotta ask for your own newline 😭
  • -h, --help β€” Print help πŸ™‹β€β™€οΈ
  • -V, --version β€” Print version πŸ‘‘
  • <files> β€” the files. the little guys. your blorbos πŸ“

πŸ’… EXTRA πŸ’…

valid format sequences for files (without --file-system) πŸ—‚οΈ

  • %a β€” access rights in octal (note '#' and '0' printf flags)
  • %A β€” access rights 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
  • %D β€” device number in hex
  • %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 (follow) if symbolic link
  • %o β€” optimal I/O transfer size hint
  • %s β€” total size, in bytes
  • %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; 0 if 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

valid format sequences for file systems πŸ’Ύ

  • %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
⚠️ 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. (translation: your shell might be doing its own thing and not telling you. check her docs. πŸ’€)

πŸ‘‘ VERSION πŸ‘‘

v(uutils coreutils) 0.12.0


πŸ“ EXAMPLES πŸ“

Display properties about a specific file such as size, permissions, creation date, and access date among others:

stat path/to/file

Display properties about a specific file, only showing the raw result data without labels:

stat [-t|--terse] path/to/file

Display information about the filesystem where a specific file is located:

stat [-f|--file-system] path/to/file

Show only octal file permissions:

stat [-c|--format] "%a %n" path/to/file

Show the owner and group of a specific file:

stat [-c|--format] "%U %G" path/to/file

Show the size of a specific file in bytes:

stat [-c|--format] "%s %n" path/to/file

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. πŸ™ˆ (no shade, she's still growing, be nice to her)


and that's the whole page bestie!! this drop is from uutils coreutils, version 0.12.0, dated 2026-09-25 β€” go forth and stat everything, you icon, you absolute legend πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from