From e7173e946f09dba55e8e2e2f62471029530fbb1f Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Mon, 9 Nov 2020 02:55:44 +0000 Subject: [PATCH] ls: print inodes in short output format when -i arg is supplied --- Userland/ls.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/ls.cpp b/Userland/ls.cpp index 2d72f7cc29..f633512deb 100644 --- a/Userland/ls.cpp +++ b/Userland/ls.cpp @@ -376,6 +376,9 @@ static bool print_filesystem_object_short(const char* path, const char* name, si return false; } + if (flag_show_inode) + printf("%08u ", st.st_ino); + *nprinted = print_name(st, name, nullptr, path); return true; }