version 1 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
STAT |
|
|
2 |
!!!STAT |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
DISPLAY |
|
|
7 |
BUGS |
|
|
8 |
AUTHORS |
|
|
9 |
SEE ALSO |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
stat - display file or filesystem status |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__stat__ [[''-l''] [[''-f''] [[''-s''] [[''-v''] |
|
|
19 |
[[''-t''] [[''-c format''] file-name |
|
|
20 |
[[file-name]... |
|
|
21 |
!!DESCRIPTION |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
This command displays information about the specified |
|
|
25 |
file(s). You do not need any access rights to the file to |
|
|
26 |
get this information but you need search rights to all |
|
|
27 |
directories named in the path leading to the |
|
|
28 |
file. |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
__stat__ stats the file pointed to by |
|
|
32 |
''file-name'' |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
__stat__ ''-l'' is identical to __stat__, only that |
|
|
36 |
for links information about the files that are obtained by |
|
|
37 |
tracing the links is displayed. |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
__stat__ ''-f'' does not stat the file itself but |
|
|
41 |
instead stats the filesystem where ''file-name'' is |
|
|
42 |
located. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__stat__ ''-s'' also shows security context |
|
|
46 |
information for SE Linux if available. |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
__stat__ ''-v'' prints version |
|
|
50 |
information. |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
__stat__ ''-t'' prints the information in terse form, |
|
|
54 |
suitable for parsing by other programs |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
__stat__ ''-c format'' displays the information in the |
|
|
58 |
format specified. |
|
|
59 |
!!DISPLAY |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
__stat__ and __stat__ ''-l'' both display the |
|
|
63 |
following information: |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
Device number |
|
|
67 |
|
|
|
68 |
|
|
|
69 |
Inode number |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
Access rights |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
Number of hard links |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
User ID (and name if available) of owner |
|
|
79 |
|
|
|
80 |
|
|
|
81 |
Group ID (and name if available) of owner |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
Device type (if inode device) |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
Total size, in bytes |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
Number of blocks allocated |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
IO block size |
|
|
94 |
|
|
|
95 |
|
|
|
96 |
Time of last access |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
Time of last modification |
|
|
100 |
|
|
|
101 |
|
|
|
102 |
Time of last change |
|
|
103 |
|
|
|
104 |
|
|
|
105 |
Security Context for SE Linux if applicable |
|
|
106 |
|
|
|
107 |
|
|
|
108 |
If ''-f'' is specified the following information is |
|
|
109 |
displayed: |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
Filesystem type |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
Block size of the filesystem |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
Total blocks in the filesystem |
|
|
119 |
|
|
|
120 |
|
|
|
121 |
Free blocks |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
Free blocks for non-root user(s) |
|
|
125 |
|
|
|
126 |
|
|
|
127 |
Total inodes |
|
|
128 |
|
|
|
129 |
|
|
|
130 |
Free inodes |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
Maximum length of filenames |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
If ''-c format'' is specified the following interpreted |
|
|
137 |
sequences are available for ''format'' : |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
%n - File name |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
%N - Quoted File name with dereference if symbolic |
|
|
144 |
link |
|
|
145 |
|
|
|
146 |
|
|
|
147 |
%d - Device number in decimal |
|
|
148 |
|
|
|
149 |
|
|
|
150 |
%D - Device number in hex |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
%i - Inode number |
|
|
154 |
|
|
|
155 |
|
|
|
156 |
%a - Access rights in octal |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
%A - Access rights in human readable form |
|
|
160 |
|
|
|
161 |
|
|
|
162 |
%f - raw mode in hex |
|
|
163 |
|
|
|
164 |
|
|
|
165 |
%F - File type |
|
|
166 |
|
|
|
167 |
|
|
|
168 |
%h - Number of hard links |
|
|
169 |
|
|
|
170 |
|
|
|
171 |
%u - User Id of owner |
|
|
172 |
|
|
|
173 |
|
|
|
174 |
%U - User name of owner |
|
|
175 |
|
|
|
176 |
|
|
|
177 |
%g - Group Id of owner |
|
|
178 |
|
|
|
179 |
|
|
|
180 |
%G - Group name of owner |
|
|
181 |
|
|
|
182 |
|
|
|
183 |
%t - Major device type in hex |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
%T - Minor device type in hex |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
%s - Total size, in bytes |
|
|
190 |
|
|
|
191 |
|
|
|
192 |
%b - Number of blocks allocated |
|
|
193 |
|
|
|
194 |
|
|
|
195 |
%o - IO block size |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
%S - SE Linux SID |
|
|
199 |
|
|
|
200 |
|
|
|
201 |
%c - SE Linux security context |
|
|
202 |
|
|
|
203 |
|
|
|
204 |
%x - Time of last access |
|
|
205 |
|
|
|
206 |
|
|
|
207 |
%X - Time of last access as seconds since Epoch |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
%y - Time of last modification |
|
|
211 |
|
|
|
212 |
|
|
|
213 |
%Y - Time of last modification as seconds since |
|
|
214 |
Epoch |
|
|
215 |
|
|
|
216 |
|
|
|
217 |
%z - Time of last change |
|
|
218 |
|
|
|
219 |
|
|
|
220 |
%Z - Time of last change as seconds since Epoch |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
If ''-c format'' and ''-f'' are specified the |
|
|
224 |
following interpreted sequences are available for |
|
|
225 |
''format'' : |
|
|
226 |
|
|
|
227 |
|
|
|
228 |
%n - File name |
|
|
229 |
|
|
|
230 |
|
|
|
231 |
%i - File System id, __val[[0] in hex |
|
|
232 |
|
|
|
233 |
|
|
|
234 |
%I - File System id, __val[[1] in hex |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
%l - Maximum length of filenames |
|
|
238 |
|
|
|
239 |
|
|
|
240 |
%t - Type in hex |
|
|
241 |
|
|
|
242 |
|
|
|
243 |
%T - Type in human readable form |
|
|
244 |
|
|
|
245 |
|
|
|
246 |
%b - Total data blocks in file system |
|
|
247 |
|
|
|
248 |
|
|
|
249 |
%f - Free blocks in file system |
|
|
250 |
|
|
|
251 |
|
|
|
252 |
%a - Free blocks available to non-superuser |
|
|
253 |
|
|
|
254 |
|
|
|
255 |
%s - Optimal transfer block size |
|
|
256 |
|
|
|
257 |
|
|
|
258 |
%c - Total file nodes in file system |
|
|
259 |
|
|
|
260 |
|
|
|
261 |
%d - Free file nodes in file system |
|
|
262 |
|
|
|
263 |
|
|
|
264 |
The printf(3) flag characters '#', '0', '-', ' ', and |
|
|
265 |
'+', as well as the field width, and presision options can |
|
|
266 |
be used in ''format.'' For example, `stat -c |
|
|
267 |
'' |
|
|
268 |
!!BUGS |
|
|
269 |
|
|
|
270 |
|
|
|
271 |
None known so far. |
|
|
272 |
!!AUTHORS |
|
|
273 |
|
|
|
274 |
|
|
|
275 |
Written by Michael Meskes |
|
|
276 |
-f'' added from __statfs__ by Radovan Garabik |
|
|
277 |
__ |
|
|
278 |
!!SEE ALSO |
|
|
279 |
|
|
|
280 |
|
|
|
281 |
stat(2), statfs(2) |
|
|
282 |
---- |