From 0b71f54e77cbd1ae3a5f0603f854058996a5cb5b Mon Sep 17 00:00:00 2001 From: Thomas Lin Date: Thu, 12 Jun 2025 12:12:37 -0700 Subject: [PATCH] Changed bash8 --- bash/bash8.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bash/bash8.sh b/bash/bash8.sh index e51089c..badedd2 100644 --- a/bash/bash8.sh +++ b/bash/bash8.sh @@ -1 +1,5 @@ -# find 5 largest files in the current directory +find . -type f -print0 \ + | xargs -0 du -h \ + | sort -hr \ + | head -n5 \ + | awk '{ printf "%s\t%s\n", $2, $1 }'