Description: There are users who want to have nanoseconds in stat command, because these users use file systems like ZFS which internally stores nanosecond timestamps. https://forums.freebsd.org/threads/how-to-change-the-stat-command-time-format-because-of-nanoseconds.79045/#post-495945 I also agree that it must be displayed as standard. That means Current behavior only with stat command: stat / 159 2 drwxr-xr-x 25 root wheel 1048 512 "Feb 24 19:25:21 2021" "Mar 27 02:39:54 2021" "Mar 27 02:39:54 2021" "Jan 1 00:59:59 1970" 32768 8 0 / Expected behavior: stat / 159 2 drwxr-xr-x 25 root wheel 1048 512 Accessed: "Mar 27 02:39:54.640747015 2021" Modified: "Mar 27 02:39:54.640747015 2021" Changed: "Mar 27 02:39:54.640747015 2021" Created: "Jan 1 00:59:59.000000000 1970" 32768 8 0 /
One may want to create a feature request upstream (OpenZFS) for this
I don't think OpenZFS is the correct upstream for a requested change in stat(1)'s output.
stat is capable of showing nanoseconds, take a look at Bug 253370. This would just be a question of whether the default format should be changed.
(In reply to David Schlachter from comment #3) > stat is capable of showing nanoseconds, take a look at Bug 253370. > This would just be a question of whether the default format should be changed. I think here only changing the default format is requested only for stat without additional commands. >Expected behavior: >stat / >159 2 drwxr-xr-x 25 root wheel 1048 512 >Accessed: "Mar 27 02:39:54.640747015 2021" >Modified: "Mar 27 02:39:54.640747015 2021" >Changed: "Mar 27 02:39:54.640747015 2021" >Created: "Jan 1 00:59:59.000000000 1970" >32768 8 0 /