# stat - pydoc - phpman

> **TLDR:** Display file and filesystem information.
>
- 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}}`

*Source: tldr-pages*

---

Help on module stat:

## NAME
    stat - Constants/functions for interpreting results of os.stat() and os.lstat().

## MODULE REFERENCE
    <https://docs.python.org/3.10/library/stat.html>

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

## DESCRIPTION
    Suggested usage: from stat import *

## FUNCTIONS
    S_IFMT(...)
        Return the portion of the file's mode that describes the file type.

    S_IMODE(...)
        Return the portion of the file's mode that can be set by os.chmod().

    S_ISBLK(...)
        S_ISBLK(mode) -> bool

        Return True if mode is from a block special device file.

    S_ISCHR(...)
        S_ISCHR(mode) -> bool

        Return True if mode is from a character special device file.

    S_ISDIR(...)
        S_ISDIR(mode) -> bool

        Return True if mode is from a directory.

    S_ISDOOR(...)
        S_ISDOOR(mode) -> bool

        Return True if mode is from a door.

    S_ISFIFO(...)
        S_ISFIFO(mode) -> bool

        Return True if mode is from a FIFO (named pipe).

    S_ISLNK(...)
        S_ISLNK(mode) -> bool

        Return True if mode is from a symbolic link.

    S_ISPORT(...)
        S_ISPORT(mode) -> bool

        Return True if mode is from an event port.

    S_ISREG(...)
        S_ISREG(mode) -> bool

        Return True if mode is from a regular file.

    S_ISSOCK(...)
        S_ISSOCK(mode) -> bool

        Return True if mode is from a socket.

    S_ISWHT(...)
        S_ISWHT(mode) -> bool

        Return True if mode is from a whiteout.

### filemode
        Convert a file's mode to a string of the form '-rwxrwxrwx'

## DATA
    FILE_ATTRIBUTE_ARCHIVE = 32
    FILE_ATTRIBUTE_COMPRESSED = 2048
    FILE_ATTRIBUTE_DEVICE = 64
    FILE_ATTRIBUTE_DIRECTORY = 16
    FILE_ATTRIBUTE_ENCRYPTED = 16384
    FILE_ATTRIBUTE_HIDDEN = 2
    FILE_ATTRIBUTE_INTEGRITY_STREAM = 32768
    FILE_ATTRIBUTE_NORMAL = 128
    FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192
    FILE_ATTRIBUTE_NO_SCRUB_DATA = 131072
    FILE_ATTRIBUTE_OFFLINE = 4096
    FILE_ATTRIBUTE_READONLY = 1
    FILE_ATTRIBUTE_REPARSE_POINT = 1024
    FILE_ATTRIBUTE_SPARSE_FILE = 512
    FILE_ATTRIBUTE_SYSTEM = 4
    FILE_ATTRIBUTE_TEMPORARY = 256
    FILE_ATTRIBUTE_VIRTUAL = 65536
    SF_APPEND = 262144
    SF_ARCHIVED = 65536
    SF_IMMUTABLE = 131072
    SF_NOUNLINK = 1048576
    SF_SNAPSHOT = 2097152
    ST_ATIME = 7
    ST_CTIME = 9
    ST_DEV = 2
    ST_GID = 5
    ST_INO = 1
    ST_MODE = 0
    ST_MTIME = 8
    ST_NLINK = 3
    ST_SIZE = 6
    ST_UID = 4
    S_ENFMT = 1024
    S_IEXEC = 64
    S_IFBLK = 24576
    S_IFCHR = 8192
    S_IFDIR = 16384
    S_IFDOOR = 0
    S_IFIFO = 4096
    S_IFLNK = 40960
    S_IFPORT = 0
    S_IFREG = 32768
    S_IFSOCK = 49152
    S_IFWHT = 0
    S_IREAD = 256
    S_IRGRP = 32
    S_IROTH = 4
    S_IRUSR = 256
    S_IRWXG = 56
    S_IRWXO = 7
    S_IRWXU = 448
    S_ISGID = 1024
    S_ISUID = 2048
    S_ISVTX = 512
    S_IWGRP = 16
    S_IWOTH = 2
    S_IWRITE = 128
    S_IWUSR = 128
    S_IXGRP = 8
    S_IXOTH = 1
    S_IXUSR = 64
    UF_APPEND = 4
    UF_COMPRESSED = 32
    UF_HIDDEN = 32768
    UF_IMMUTABLE = 2
    UF_NODUMP = 1
    UF_NOUNLINK = 16
    UF_OPAQUE = 8

## FILE
    /usr/lib/python3.10/stat.py


