diff --git a/.bash_functions b/.bash_functions index f0c8114..75b12bf 100644 --- a/.bash_functions +++ b/.bash_functions @@ -88,3 +88,10 @@ function compress_files() { zip -r "$1" "${@:2}" fi } + +# Du to a depth and human readable +function duh() { + local depth=${1:-1} + local path=${2:-"."} + du -hx -d "$depth" -- "$path" | sort -h +}