Skip to content

Instantly share code, notes, and snippets.

@ryanmaclean
Created December 23, 2020 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanmaclean/2bb517055d9f6d1ef3d7609a5b7d9acd to your computer and use it in GitHub Desktop.
Save ryanmaclean/2bb517055d9f6d1ef3d7609a5b7d9acd to your computer and use it in GitHub Desktop.
du top ten inodes and disk space
#!/usr/bin/env bash
set -euox pipefail
# Disk utilization for files and inodes
# to use:
# `./du10.sh`
# Top ten inodes, queue depth 1
du -ad 1 --inodes . | sort -rn | head -10
# Top ten foldes/files by size in human-readable units (K/M/G/T)
du -hsx * | sort -rn | head -10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment