|
|
@ -8,11 +8,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
function duh { |
|
|
|
function duh { |
|
|
|
(( $# == 0 )) && set -- * |
|
|
|
(( $# == 0 )) && set -- * |
|
|
|
|
|
|
|
|
|
|
|
if grep -q -i 'GNU' < <(du --version 2>&1); then |
|
|
|
if grep -q -i 'GNU' < <(du --version 2>&1); then |
|
|
|
du -khsc "$@" | sort -h -r |
|
|
|
du -khsc "$@" | sort -h -r |
|
|
|
else |
|
|
|
else |
|
|
|
local line size name |
|
|
|
local line size name |
|
|
|
local -a record |
|
|
|
local -a record |
|
|
|
|
|
|
|
|
|
|
|
while IFS=$'\n' read line; do |
|
|
|
while IFS=$'\n' read line; do |
|
|
|
record=(${(z)line}) |
|
|
|
record=(${(z)line}) |
|
|
|
size="$(($record[1] / 1024.0))" |
|
|
|
size="$(($record[1] / 1024.0))" |
|
|
|