diff --git a/bash_utils b/bash_utils new file mode 100644 index 0000000..75e5287 --- /dev/null +++ b/bash_utils @@ -0,0 +1,3 @@ +dus () { + du -h ${1} -d ${2:=1} | sed 's/\([[:digit:]]\)\t/\1B\t/' | sed 's/\(.\t\)/\t\1/' | sed 's/G\t/Z\t/' | sort -n -k 2d,2 -k 1n,1 | sed 's/Z\t/G\t/' +}