Skip to content

Instantly share code, notes, and snippets.

View peterklipfel's full-sized avatar

Peter Klipfel peterklipfel

View GitHub Profile
@peterklipfel
peterklipfel / du_hsort.sh
Created April 5, 2016 16:12 — forked from trinitronx/du_hsort.sh
Script to sort disk usage output by size
#!/bin/bash
# This line sorts first according to numerical size in bytes
# the second pass through du in the while loop converts to human readable
# format
du -s * | sort -n | cut -f 2- | while read a; do du -hs "$a"; done