[Nottingham] FYI: stat -t (stat terse format)
Martin
martin at ml1.co.uk
Tue Jan 16 16:33:54 GMT 2007
Just came across an incomplete man page description...
For "stat", nothing is said about what "stat -t" ("stat -terse") outputs!
Looking up the source code and... The terse option gives a different
output depending on what flavour or unix is used.
For Linux 2.6 at least, the output given is:
#
# stat -t mmd5c02
#
# File: `mmd5c02'
# Size: 452 Blocks: 8 IO Block: 131072 regular file
# Device: 2207h/8711d Inode: 254124 Links: 1
# Access: (0700/-rwx------) Uid: ( 500/ martin) Gid: ( 500/ martin)
# Access: 2007-01-16 15:42:48.000000000 +0000
# Modify: 2007-01-16 15:42:48.000000000 +0000
# Change: 2007-01-16 15:43:06.000000000 +0000
#
# stat -t mmd5c02
#
# mmd5c02 452 8 81c0 500 500 2207 254124 1 0 0 1168962168 1168962168
1168962186 131072
#
# terse format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o":
# filename size(bytes) blocks Raw_mode(HEX) Uid Gid Device(HEX) Inode
hard_links major_device_type(HEX) minor_device_type(HEX) Access(Epoch
seconds) Modify(Epoch seconds) Change(Epoch seconds) IOblock
#
It would be nice if the man page at least said that the output depended
on what unix was used...
Hope that helps whomever rather than having to do a "try-it-and-guess"!
Happy hackings,
Martin
--
----------------
Martin Lomas
martin at ml1.co.uk
----------------
More information about the Nottingham
mailing list