Skip to content

Instantly share code, notes, and snippets.

@michalmonday
Created July 1, 2022 14:14
Show Gist options
  • Save michalmonday/9a3099f90bbde0f09ba8f3544eb23451 to your computer and use it in GitHub Desktop.
Save michalmonday/9a3099f90bbde0f09ba8f3544eb23451 to your computer and use it in GitHub Desktop.
Simple but super useful for cleaning space bash script to list largest files.
if [ $# -eq 0 ]; then
PATH_DU="."
else
PATH_DU="$1"
fi
sudo du -ah --max-depth=1 $PATH_DU | sort -rh | head -n 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment