1STAT(1)                          User Commands                         STAT(1)
2
3
4

NAME

6       stat - display file or file system status
7

SYNOPSIS

9       stat [OPTION]... FILE...
10

DESCRIPTION

12       Display file or file system status.
13
14       Mandatory  arguments  to  long  options are mandatory for short options
15       too.
16
17       -L, --dereference
18              follow links
19
20       -f, --file-system
21              display file system status instead of file status
22
23       --cached=MODE
24              specify how to use cached attributes; useful on remote file sys‐
25              tems. See MODE below
26
27       -c  --format=FORMAT
28              use  the  specified FORMAT instead of the default; output a new‐
29              line after each use of FORMAT
30
31       --printf=FORMAT
32              like --format, but interpret backslash escapes, and do not  out‐
33              put a mandatory trailing newline; if you want a newline, include
34              \n in FORMAT
35
36       -t, --terse
37              print the information in terse form
38
39       --help display this help and exit
40
41       --version
42              output version information and exit
43
44       The --cached MODE argument can be; always, never, or default.  `always`
45       will use cached attributes if available, while `never` will try to syn‐
46       chronize with the latest attributes, and `default` will leave it up  to
47       the underlying file system.
48
49       The valid format sequences for files (without --file-system):
50
51       %a     permission bits in octal (note '#' and '0' printf flags)
52
53       %A     permission bits and file type in human readable form
54
55       %b     number of blocks allocated (see %B)
56
57       %B     the size in bytes of each block reported by %b
58
59       %C     SELinux security context string
60
61       %d     device number in decimal
62
63       %D     device number in hex
64
65       %f     raw mode in hex
66
67       %F     file type
68
69       %g     group ID of owner
70
71       %G     group name of owner
72
73       %h     number of hard links
74
75       %i     inode number
76
77       %m     mount point
78
79       %n     file name
80
81       %N     quoted file name with dereference if symbolic link
82
83       %o     optimal I/O transfer size hint
84
85       %s     total size, in bytes
86
87       %t     major  device  type  in  hex, for character/block device special
88              files
89
90       %T     minor device type in hex,  for  character/block  device  special
91              files
92
93       %u     user ID of owner
94
95       %U     user name of owner
96
97       %w     time of file birth, human-readable; - if unknown
98
99       %W     time of file birth, seconds since Epoch; 0 if unknown
100
101       %x     time of last access, human-readable
102
103       %X     time of last access, seconds since Epoch
104
105       %y     time of last data modification, human-readable
106
107       %Y     time of last data modification, seconds since Epoch
108
109       %z     time of last status change, human-readable
110
111       %Z     time of last status change, seconds since Epoch
112
113       Valid format sequences for file systems:
114
115       %a     free blocks available to non-superuser
116
117       %b     total data blocks in file system
118
119       %c     total file nodes in file system
120
121       %d     free file nodes in file system
122
123       %f     free blocks in file system
124
125       %i     file system ID in hex
126
127       %l     maximum length of filenames
128
129       %n     file name
130
131       %s     block size (for faster transfers)
132
133       %S     fundamental block size (for block counts)
134
135       %t     file system type in hex
136
137       %T     file system type in human readable form
138
139   --terse is equivalent to the following FORMAT:
140              %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o %C
141
142   --terse --file-system is equivalent to the following FORMAT:
143              %n %i %l %t %s %S %b %f %a %c %d
144
145       NOTE: your shell may have its own version of stat, which usually super‐
146       sedes the version described here.  Please refer to your  shell's  docu‐
147       mentation for details about the options it supports.
148

AUTHOR

150       Written by Michael Meskes.
151

REPORTING BUGS

153       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
154       Report any translation bugs to <https://translationproject.org/team/>
155
157       Copyright  ©  2020  Free Software Foundation, Inc.  License GPLv3+: GNU
158       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
159       This is free software: you are free  to  change  and  redistribute  it.
160       There is NO WARRANTY, to the extent permitted by law.
161

SEE ALSO

163       stat(2), statfs(2), statx(2)
164
165       Full documentation <https://www.gnu.org/software/coreutils/stat>
166       or available locally via: info '(coreutils) stat invocation'
167
168
169
170GNU coreutils 8.32                 July 2021                           STAT(1)
Impressum