From 8079d566f174efb0d3754f4670950450e009b335 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 6 Jan 2021 10:29:33 -0500 Subject: [PATCH] Userland: Include hard link count in "ls -l" output --- Userland/ls.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/ls.cpp b/Userland/ls.cpp index fdba463f8ef..bdeba14361d 100644 --- a/Userland/ls.cpp +++ b/Userland/ls.cpp @@ -288,6 +288,8 @@ static bool print_filesystem_object(const String& path, const String& name, cons else printf("%c", st.st_mode & S_IXOTH ? 'x' : '-'); + printf(" %u", st.st_nlink); + auto username = users.get(st.st_uid); if (!flag_print_numeric && username.has_value()) { printf(" %7s", username.value().characters());