summaryrefslogtreecommitdiffstats
path: root/man/stat.1
blob: 29ffbe44778598265d78154b27a4b2bf5ceb36b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.48.5.
.TH STAT "1" "April 2022" "GNU coreutils 9.1" "User Commands"
.SH NAME
stat \- display file or file system status
.SH SYNOPSIS
.B stat
[\fI\,OPTION\/\fR]... \fI\,FILE\/\fR...
.SH DESCRIPTION
.\" Add any additional description here
.PP
Display file or file system status.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\fB\-L\fR, \fB\-\-dereference\fR
follow links
.TP
\fB\-f\fR, \fB\-\-file\-system\fR
display file system status instead of file status
.TP
\fB\-\-cached\fR=\fI\,MODE\/\fR
specify how to use cached attributes;
useful on remote file systems. See MODE below
.TP
\fB\-c\fR  \fB\-\-format\fR=\fI\,FORMAT\/\fR
use the specified FORMAT instead of the default;
output a newline after each use of FORMAT
.TP
\fB\-\-printf\fR=\fI\,FORMAT\/\fR
like \fB\-\-format\fR, but interpret backslash escapes,
and do not output a mandatory trailing newline;
if you want a newline, include \en in FORMAT
.TP
\fB\-t\fR, \fB\-\-terse\fR
print the information in terse form
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit
.PP
The MODE argument of \fB\-\-cached\fR can be: always, never, or default.
\&'always' will use cached attributes if available, while
\&'never' will try to synchronize with the latest attributes, and
\&'default' will leave it up to the underlying file system.
.PP
The valid format sequences for files (without \fB\-\-file\-system\fR):
.TP
%a
permission bits in octal (note '#' and '0' printf flags)
.TP
%A
permission bits and file type in human readable form
.TP
%b
number of blocks allocated (see %B)
.TP
%B
the size in bytes of each block reported by %b
.TP
%C
SELinux security context string
.TP
%d
device number in decimal (st_dev)
.TP
%D
device number in hex (st_dev)
.TP
%Hd
major device number in decimal
.TP
%Ld
minor device number in decimal
.TP
%f
raw mode in hex
.TP
%F
file type
.TP
%g
group ID of owner
.TP
%G
group name of owner
.TP
%h
number of hard links
.TP
%i
inode number
.TP
%m
mount point
.TP
%n
file name
.TP
%N
quoted file name with dereference if symbolic link
.TP
%o
optimal I/O transfer size hint
.TP
%s
total size, in bytes
.TP
%r
device type in decimal (st_rdev)
.TP
%R
device type in hex (st_rdev)
.TP
%Hr
major device type in decimal, for character/block device special files
.TP
%Lr
minor device type in decimal, for character/block device special files
.TP
%t
major device type in hex, for character/block device special files
.TP
%T
minor device type in hex, for character/block device special files
.TP
%u
user ID of owner
.TP
%U
user name of owner
.TP
%w
time of file birth, human\-readable; \- if unknown
.TP
%W
time of file birth, seconds since Epoch; 0 if unknown
.TP
%x
time of last access, human\-readable
.TP
%X
time of last access, seconds since Epoch
.TP
%y
time of last data modification, human\-readable
.TP
%Y
time of last data modification, seconds since Epoch
.TP
%z
time of last status change, human\-readable
.TP
%Z
time of last status change, seconds since Epoch
.PP
Valid format sequences for file systems:
.TP
%a
free blocks available to non\-superuser
.TP
%b
total data blocks in file system
.TP
%c
total file nodes in file system
.TP
%d
free file nodes in file system
.TP
%f
free blocks in file system
.TP
%i
file system ID in hex
.TP
%l
maximum length of filenames
.TP
%n
file name
.TP
%s
block size (for faster transfers)
.TP
%S
fundamental block size (for block counts)
.TP
%t
file system type in hex
.TP
%T
file system type in human readable form
.SS "--terse is equivalent to the following FORMAT:"
.IP
%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o %C
.SS "--terse --file-system is equivalent to the following FORMAT:"
.IP
%n %i %l %t %s %S %b %f %a %c %d
.PP
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.
.SH AUTHOR
Written by Michael Meskes.
.SH "REPORTING BUGS"
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
.br
Report any translation bugs to <https://translationproject.org/team/>
.SH COPYRIGHT
Copyright \(co 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
\fBstat\fP(2), \fBstatfs\fP(2), \fBstatx\fP(2)
.PP
.br
Full documentation <https://www.gnu.org/software/coreutils/stat>
.br
or available locally via: info \(aq(coreutils) stat invocation\(aq