[Fix #134] Check for GNU du instead of Linux
This commit is contained in:
parent
906d6c8d15
commit
69b3d07923
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
function duh {
|
function duh {
|
||||||
(( $# == 0 )) && set -- *
|
(( $# == 0 )) && set -- *
|
||||||
if [[ "$OSTYPE" == linux* ]]; then
|
if grep -q -i 'GNU' < <(du --version 2>&1); then
|
||||||
du -khsc "$@" | sort -h -r
|
du -khsc "$@" | sort -h -r
|
||||||
else
|
else
|
||||||
du -kcs "$@" | awk '{ printf "%9.1fM %s\n", $1 / 1024, $2 } ' | sort -n -r
|
du -kcs "$@" | awk '{ printf "%9.1fM %s\n", $1 / 1024, $2 } ' | sort -n -r
|
||||||
|
|
Loading…
Reference in a new issue