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 }'