summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-01-06 10:29:33 -0500
committerAndreas Kling <kling@serenityos.org>2021-01-07 08:22:10 +0100
commit8079d566f174efb0d3754f4670950450e009b335 (patch)
tree32d8fcade24edd70f7e072067da5c95ff5241e2e
parentddc255a6c0026af70a7ca685c2fed24941e7df9c (diff)
downloadserenity-8079d566f174efb0d3754f4670950450e009b335.zip
Userland: Include hard link count in "ls -l" output
-rw-r--r--Userland/ls.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/ls.cpp b/Userland/ls.cpp
index fdba463f8e..bdeba14361 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());