Merge branch 'master' of http://github.com/noqqe/bash-it into noqqe-master

pull/21/head
Robert R Evans 2010-11-02 08:50:37 -07:00
commit 2d9da1f156
1 changed files with 15 additions and 6 deletions

View File

@ -32,12 +32,21 @@ pri() {
# disk usage per directory
# in Mac OS X and Linux
usage ()
{
if [ $1 ]
then
du -hd $1
else
du -hd 1
fi
if [ $(uname) = "Darwin" ]; then
if [ -n $1 ]; then
du -hd $1
else
du -hd 1
fi
elif [ $(uname) = "Linux" ]; then
if [ -n $1 ]; then
du -h --max-depth=1 $1
else
du -h --max-depth=1
fi
fi
}