1STAT(1) User Commands STAT(1)
2
3
4
6 stat - display file or file system status
7
9 stat [OPTION]... FILE...
10
12 Display file or file system status.
13
14 -L, --dereference
15 follow links
16
17 -Z, --context
18 print the SELinux security context
19
20 -f, --file-system
21 display file system status instead of file status
22
23 -c --format=FORMAT
24 use the specified FORMAT instead of the default; output a new‐
25 line after each use of FORMAT
26
27 --printf=FORMAT
28 like --format, but interpret backslash escapes, and do not out‐
29 put a mandatory trailing newline. If you want a newline,
30 include \n in FORMAT.
31
32 -t, --terse
33 print the information in terse form
34
35 --help display this help and exit
36
37 --version
38 output version information and exit
39
40 The valid format sequences for files (without --file-system):
41
42 %a Access rights in octal
43
44 %A Access rights in human readable form
45
46 %b Number of blocks allocated (see %B)
47
48 %B The size in bytes of each block reported by %b
49
50 %C SELinux security context string
51
52 %d Device number in decimal
53
54 %D Device number in hex
55
56 %f Raw mode in hex
57
58 %F File type
59
60 %g Group ID of owner
61
62 %G Group name of owner
63
64 %h Number of hard links
65
66 %i Inode number
67
68 %n File name
69
70 %N Quoted file name with dereference if symbolic link
71
72 %o I/O block size
73
74 %s Total size, in bytes
75
76 %t Major device type in hex
77
78 %T Minor device type in hex
79
80 %u User ID of owner
81
82 %U User name of owner
83
84 %x Time of last access
85
86 %X Time of last access as seconds since Epoch
87
88 %y Time of last modification
89
90 %Y Time of last modification as seconds since Epoch
91
92 %z Time of last change
93
94 %Z Time of last change as seconds since Epoch
95
96 Valid format sequences for file systems:
97
98 %a Free blocks available to non-superuser
99
100 %b Total data blocks in file system
101
102 %c Total file nodes in file system
103
104 %d Free file nodes in file system
105
106 %f Free blocks in file system
107
108 %C SELinux security context string
109
110 %i File System ID in hex
111
112 %l Maximum length of filenames
113
114 %n File name
115
116 %s Block size (for faster transfers)
117
118 %S Fundamental block size (for block counts)
119
120 %t Type in hex
121
122 %T Type in human readable form
123
124 NOTE: your shell may have its own version of stat, which usually super‐
125 sedes the version described here. Please refer to your shell's docu‐
126 mentation for details about the options it supports.
127
129 Written by Michael Meskes.
130
132 Report stat bugs to bug-coreutils@gnu.org
133 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
134 General help using GNU software: <http://www.gnu.org/gethelp/>
135 Report stat translation bugs to <http://translationproject.org/team/>
136
138 Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
139 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
140 This is free software: you are free to change and redistribute it.
141 There is NO WARRANTY, to the extent permitted by law.
142
144 stat(2)
145
146 The full documentation for stat is maintained as a Texinfo manual. If
147 the info and stat programs are properly installed at your site, the
148 command
149
150 info coreutils 'stat invocation'
151
152 should give you access to the complete manual.
153
154
155
156GNU coreutils 8.4 June 2018 STAT(1)