blob: 924798051bbc8893d375b1e3f2106edb73aecbf9 [file] [log] [blame] [raw]
stat(1): include birth time in GNU format.
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/usr.bin/stat/stat.c freebsd-11.1/usr/src/usr.bin/stat/stat.c
--- /usr/src/usr.bin/stat/stat.c 2017-07-21 07:43:24.000000000 +0800
+++ freebsd-11.1/usr/src/usr.bin/stat/stat.c 2019-03-22 14:42:10.561140000 +0800
@@ -103,14 +103,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"
@@ -305,9 +306,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);