Skip to content

Instantly share code, notes, and snippets.

@henno
Last active March 26, 2024 08:05
Show Gist options
  • Save henno/180c1fc9bbb74606062e6458c990f934 to your computer and use it in GitHub Desktop.
Save henno/180c1fc9bbb74606062e6458c990f934 to your computer and use it in GitHub Desktop.
Disk Usage of Directory Items with Sizes Sorted
#!/bin/sh
find . -maxdepth 1 -mindepth 1 -exec du -sh {} \; 2>/dev/null | sort -h | sed 's|\./||'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment