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 MODE argument of --cached can be: always, never, or default.   'al‐
45       ways'  will  use cached attributes if available, while 'never' will try
46       to synchronize with the latest attributes, and 'default' will leave  it
47       up to 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 (st_dev)
62
63       %D     device number in hex (st_dev)
64
65       %Hd    major device number in decimal
66
67       %Ld    minor device number in decimal
68
69       %f     raw mode in hex
70
71       %F     file type
72
73       %g     group ID of owner
74
75       %G     group name of owner
76
77       %h     number of hard links
78
79       %i     inode number
80
81       %m     mount point
82
83       %n     file name
84
85       %N     quoted file name with dereference if symbolic link
86
87       %o     optimal I/O transfer size hint
88
89       %s     total size, in bytes
90
91       %r     device type in decimal (st_rdev)
92
93       %R     device type in hex (st_rdev)
94
95       %Hr    major device type in decimal, for character/block device special
96              files
97
98       %Lr    minor device type in decimal, for character/block device special
99              files
100
101       %t     major  device  type  in  hex, for character/block device special
102              files
103
104       %T     minor device type in hex,  for  character/block  device  special
105              files
106
107       %u     user ID of owner
108
109       %U     user name of owner
110
111       %w     time of file birth, human-readable; - if unknown
112
113       %W     time of file birth, seconds since Epoch; 0 if unknown
114
115       %x     time of last access, human-readable
116
117       %X     time of last access, seconds since Epoch
118
119       %y     time of last data modification, human-readable
120
121       %Y     time of last data modification, seconds since Epoch
122
123       %z     time of last status change, human-readable
124
125       %Z     time of last status change, seconds since Epoch
126
127       Valid format sequences for file systems:
128
129       %a     free blocks available to non-superuser
130
131       %b     total data blocks in file system
132
133       %c     total file nodes in file system
134
135       %d     free file nodes in file system
136
137       %f     free blocks in file system
138
139       %i     file system ID in hex
140
141       %l     maximum length of filenames
142
143       %n     file name
144
145       %s     block size (for faster transfers)
146
147       %S     fundamental block size (for block counts)
148
149       %t     file system type in hex
150
151       %T     file system type in human readable form
152
153   --terse is equivalent to the following FORMAT:
154              %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o %C
155
156   --terse --file-system is equivalent to the following FORMAT:
157              %n %i %l %t %s %S %b %f %a %c %d
158
159       NOTE: your shell may have its own version of stat, which usually super‐
160       sedes the version described here.  Please refer to your  shell's  docu‐
161       mentation for details about the options it supports.
162

AUTHOR

164       Written by Michael Meskes.
165

REPORTING BUGS

167       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
168       Report any translation bugs to <https://translationproject.org/team/>
169
171       Copyright  ©  2021  Free Software Foundation, Inc.  License GPLv3+: GNU
172       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
173       This is free software: you are free  to  change  and  redistribute  it.
174       There is NO WARRANTY, to the extent permitted by law.
175

SEE ALSO

177       stat(2), statfs(2), statx(2)
178
179       Full documentation <https://www.gnu.org/software/coreutils/stat>
180       or available locally via: info '(coreutils) stat invocation'
181
182
183
184GNU coreutils 9.0                 March 2022                           STAT(1)
Impressum