Bug 201999 - [feature request] [PATCH] stat(1): add Birth time in -x display mode
Summary: [feature request] [PATCH] stat(1): add Birth time in -x display mode
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-31 02:11 UTC by Andrey Fesenko
Modified: 2019-08-29 17:27 UTC (History)
1 user (show)

See Also:


Attachments
stat.c diff add Birth time (343 bytes, patch)
2015-07-31 02:11 UTC, Andrey Fesenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Fesenko 2015-07-31 02:11:30 UTC
Created attachment 159403 [details]
stat.c diff add Birth time

Add displaying Birth time in -x (linux) display mode

Perhaps it is worth adding the display of other parameters

For example Linux output:
Inode: 1179652 Type: regular Mode: 0644 Flags: 0x80000
Generation: 1390581126 Version: 0x00000000:00000001
User: 0 Group: 0 Size: 140
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 8
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x534ff70e:c3dda9a0 -- Thu Apr 17 11:45:18 2014
atime: 0x55ba2229:351e05bc -- Thu Jul 30 09:10:01 2015
mtime: 0x53056bec:00000000 -- Wed Feb 19 21:43:56 2014
crtime: 0x534ff70e:c3dda9a0 -- Thu Apr 17 11:45:18 2014
Size of extra inode fields: 28
EXTENTS:
(0):4751361
Comment 1 Sean McBride 2019-08-25 16:00:28 UTC
Was this patch never applied?

On Ubuntu 18.04.2, 'stat filename' outputs something like:

  File: test
  Size: 3861      	Blocks: 8          IO Block: 4096   regular file
Device: 802h/2050d	Inode: 918029      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/rogueadmin)   Gid: ( 1000/rogueadmin)
Access: 2019-05-25 16:53:13.783852793 -0400
Modify: 2019-02-06 19:49:15.000000000 -0500
Change: 2019-05-25 16:54:12.358899742 -0400
 Birth: -

On FreeBSD 11.2, 'stat -x filename' outputs:

  File: "test"
  Size: 1894         FileType: Regular File
  Mode: (0770/-rwxrwx---)         Uid: ( 1029/    sean)  Gid: ( 2017/ProductionWrite)
Device: 68,3128754256   Inode: 20    Links: 1
Access: Fri Aug 23 12:33:35 2019
Modify: Thu Aug 22 17:24:11 2019
Change: Fri Aug 23 12:33:35 2019


Indeed the 'birth' time is not there.
Comment 2 Andrey Fesenko 2019-08-29 17:27:57 UTC
https://reviews.freebsd.org/D20130

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20130