Skip to content

Commit

Permalink
[Fix sorin-ionescu#134] Check for GNU du instead of Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
RIT80 committed Apr 12, 2012
1 parent 1c4db73 commit 17c41dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/utility/functions/duh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

function duh {
(( $# == 0 )) && set -- *
if [[ "$OSTYPE" == linux* ]]; then
if grep -q -i 'GNU' < <(du --version 2>&1); then
du -khsc "$@" | sort -h -r
else
du -kcs "$@" | awk '{ printf "%9.1fM %s\n", $1 / 1024, $2 } ' | sort -n -r
Expand Down

0 comments on commit 17c41dd

Please sign in to comment.