blob: 2f7385fe65384360123d885c7c97ad7878ad6b60 [file] [log] [blame] [raw]
stat(1): include birth time in GNU format.
diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-src/usr/src/usr.bin/stat/stat.c freebsd-10.3/usr/src/usr.bin/stat/stat.c
--- /var/tmp/freebsd-src/usr/src/usr.bin/stat/stat.c 2016-03-25 09:10:09.000000000 +0800
+++ freebsd-10.3/usr/src/usr.bin/stat/stat.c 2018-08-03 16:00:15.378033162 +0800
@@ -102,14 +102,15 @@
"st_uid=%u st_gid=%g st_rdev=%r st_size=%z " \
"st_atime=%a st_mtime=%m st_ctime=%c " SHELL_B \
"st_blksize=%k st_blocks=%b" SHELL_F
-#define LINUX_FORMAT \
+#define GNU_FORMAT \
" File: \"%N\"%n" \
" Size: %-11z FileType: %HT%n" \
" Mode: (%OMp%03OLp/%.10Sp) Uid: (%5u/%8Su) Gid: (%5g/%8Sg)%n" \
"Device: %Hd,%Ld Inode: %i Links: %l%n" \
"Access: %Sa%n" \
"Modify: %Sm%n" \
- "Change: %Sc"
+ "Change: %Sc%n" \
+ " Birth: %SB"
#define TIME_FORMAT "%b %e %T %Y"
@@ -298,9 +299,11 @@
statfmt = SHELL_FORMAT;
break;
case 'x':
- statfmt = LINUX_FORMAT;
- if (timefmt == NULL)
- timefmt = "%c";
+ statfmt = GNU_FORMAT;
+ if (timefmt == NULL) {
+ //timefmt = "%c";
+ timefmt = "%F %T %z";
+ }
break;
default:
usage(synopsis);