`stat -c %a` doesn't output a leading zero, but `stat` does. --- toys/other/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From babf60c65054247316cc469f79c849e5e22d75a9 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <e...@google.com> Date: Thu, 28 Jun 2018 16:30:38 -0700 Subject: [PATCH] stat: fix %a in default output.
`stat -c %a` doesn't output a leading zero, but `stat` does. --- toys/other/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/stat.c b/toys/other/stat.c index f815274..fafd29a 100644 --- a/toys/other/stat.c +++ b/toys/other/stat.c @@ -183,7 +183,7 @@ void stat_main(void) "Inodes: Total: %c\tFree: %d" : " File: %N\n Size: %s\t Blocks: %b\t IO Blocks: %B\t%F\n" "Device: %Dh/%dd\t Inode: %i\t Links: %h\n" - "Access: (%a/%A)\tUid: (%5u/%8U)\tGid: (%5g/%8G)\n" + "Access: (0%a/%A)\tUid: (%5u/%8U)\tGid: (%5g/%8G)\n" "Access: %x\nModify: %y\nChange: %z"; if (toys.optflags & FLAG_c) format = TT.fmt; -- 2.18.0.rc2.346.g013aa6912e-goog
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net