| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: stat.1,v 1.39 2017/09/19 21:45:28 christos Exp $ | | 1 | .\" $NetBSD: stat.1,v 1.40 2017/09/20 08:57:02 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2002-2011 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2002-2011 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Andrew Brown and Jan Schaumann. | | 7 | .\" by Andrew Brown and Jan Schaumann. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -173,27 +173,27 @@ This is equivalent to specifying | | | @@ -173,27 +173,27 @@ This is equivalent to specifying |
173 | FMT="st_dev=%d st_ino=%i st_mode=%#p st_nlink=%l st_uid=%u st_gid=%g" | | 173 | FMT="st_dev=%d st_ino=%i st_mode=%#p st_nlink=%l st_uid=%u st_gid=%g" |
174 | FMT="$FMT st_rdev=%r st_size=%z st_atime=%Sa st_mtime=%Sm st_ctime=%Sc" | | 174 | FMT="$FMT st_rdev=%r st_size=%z st_atime=%Sa st_mtime=%Sm st_ctime=%Sc" |
175 | FMT="$FMT st_birthtime=%SB st_blksize=%k st_blocks=%b st_flags=%f" | | 175 | FMT="$FMT st_birthtime=%SB st_blksize=%k st_blocks=%b st_flags=%f" |
176 | stat -t %s -f "$FMT" . | | 176 | stat -t %s -f "$FMT" . |
177 | .Ed | | 177 | .Ed |
178 | Note that if you use a timeformat that contains embedded whitespace or shell | | 178 | Note that if you use a timeformat that contains embedded whitespace or shell |
179 | meta-characters you will need to include appropriate quoting so the | | 179 | meta-characters you will need to include appropriate quoting so the |
180 | .Fl s | | 180 | .Fl s |
181 | output remains valid. | | 181 | output remains valid. |
182 | .It Fl t Ar timefmt | | 182 | .It Fl t Ar timefmt |
183 | Display timestamps using the specified format. | | 183 | Display timestamps using the specified format. |
184 | This format is | | 184 | This format is |
185 | passed directly to | | 185 | passed directly to |
186 | .Xr strftime 3 | | 186 | .Xr strftime 3 |
187 | with the extension that %f prints nanoseconds if available. | | 187 | with the extension that %f prints nanoseconds if available. |
188 | .It Fl v | | 188 | .It Fl v |
189 | Turn off quiet mode. | | 189 | Turn off quiet mode. |
190 | .It Fl x | | 190 | .It Fl x |
191 | Display information in a more verbose way as known from some Linux | | 191 | Display information in a more verbose way as known from some Linux |
192 | distributions. | | 192 | distributions. |
193 | .El | | 193 | .El |
194 | .Ss FORMATS | | 194 | .Ss FORMATS |
195 | Format strings are similar to | | 195 | Format strings are similar to |
196 | .Xr printf 3 | | 196 | .Xr printf 3 |
197 | formats in that they start with | | 197 | formats in that they start with |
198 | .Cm % , | | 198 | .Cm % , |
199 | are then followed by a sequence of formatting characters, and end in | | 199 | are then followed by a sequence of formatting characters, and end in |
| @@ -265,28 +265,29 @@ Floating point output only applies to ti | | | @@ -265,28 +265,29 @@ Floating point output only applies to ti |
265 | .Cm a , | | 265 | .Cm a , |
266 | .Cm m , | | 266 | .Cm m , |
267 | and | | 267 | and |
268 | .Cm c | | 268 | .Cm c |
269 | fields). | | 269 | fields). |
270 | .Pp | | 270 | .Pp |
271 | The special output specifier | | 271 | The special output specifier |
272 | .Cm S | | 272 | .Cm S |
273 | may be used to indicate that the output, if | | 273 | may be used to indicate that the output, if |
274 | applicable, should be in string format. | | 274 | applicable, should be in string format. |
275 | May be used in combination with | | 275 | May be used in combination with |
276 | .Bl -tag -width Ds | | 276 | .Bl -tag -width Ds |
277 | .It Cm amc | | 277 | .It Cm amc |
278 | Display date in strftime(3) format | | 278 | Display date in |
279 | with the extension that %f prints nanoseconds if available. | | 279 | .Xr strftime 3 |
| | | 280 | format with the extension that %f prints nanoseconds if available. |
280 | .It Cm dr | | 281 | .It Cm dr |
281 | Display actual device name. | | 282 | Display actual device name. |
282 | .It Cm gu | | 283 | .It Cm gu |
283 | Display group or user name. | | 284 | Display group or user name. |
284 | .It Cm p | | 285 | .It Cm p |
285 | Display the mode of | | 286 | Display the mode of |
286 | .Ar file | | 287 | .Ar file |
287 | as in | | 288 | as in |
288 | .Ic ls -lTd . | | 289 | .Ic ls -lTd . |
289 | .It Cm N | | 290 | .It Cm N |
290 | Displays the name of | | 291 | Displays the name of |
291 | .Ar file . | | 292 | .Ar file . |
292 | .It Cm T | | 293 | .It Cm T |
| @@ -402,27 +403,27 @@ Number of hard links to | | | @@ -402,27 +403,27 @@ Number of hard links to |
402 | .It Cm u , g | | 403 | .It Cm u , g |
403 | User-id and group-id of | | 404 | User-id and group-id of |
404 | .Ar file Ap s | | 405 | .Ar file Ap s |
405 | owner | | 406 | owner |
406 | .Pq Fa st_uid , st_gid . | | 407 | .Pq Fa st_uid , st_gid . |
407 | .It Cm r | | 408 | .It Cm r |
408 | Device number for character and block device special files | | 409 | Device number for character and block device special files |
409 | .Pq Fa st_rdev . | | 410 | .Pq Fa st_rdev . |
410 | .It Cm a , m , c , B | | 411 | .It Cm a , m , c , B |
411 | The time | | 412 | The time |
412 | .Ar file | | 413 | .Ar file |
413 | was last accessed or modified, or when the inode was last changed, or | | 414 | was last accessed or modified, or when the inode was last changed, or |
414 | the birth time of the inode | | 415 | the birth time of the inode |
415 | .Pq Fa st_atime , st_mtime , st_ctime, st_birthtime . | | 416 | .Pq Fa st_atime , st_mtime , st_ctime , st_birthtime . |
416 | .It Cm z | | 417 | .It Cm z |
417 | The size of | | 418 | The size of |
418 | .Ar file | | 419 | .Ar file |
419 | in bytes | | 420 | in bytes |
420 | .Pq Fa st_size . | | 421 | .Pq Fa st_size . |
421 | .It Cm b | | 422 | .It Cm b |
422 | Number of blocks allocated for | | 423 | Number of blocks allocated for |
423 | .Ar file | | 424 | .Ar file |
424 | .Pq Fa st_blocks . | | 425 | .Pq Fa st_blocks . |
425 | .It Cm k | | 426 | .It Cm k |
426 | Optimal file system I/O operation block size | | 427 | Optimal file system I/O operation block size |
427 | .Pq Fa st_blksize . | | 428 | .Pq Fa st_blksize . |
428 | .It Cm f | | 429 | .It Cm f |