Find the 20 largest files

@linuxgnuยท1d ago87 views
ShellPublic
# Find the 20 largest files under the current directory
find . -type f -printf '%s\t%p\n' 2>/dev/null \
  | sort -nr \
  | head -n 20 \
  | awk '{ $1 = sprintf("%.1fMB", $1/1024/1024); print }'

Comments(0)

No comments yet. Start the conversation.