Merge branch 'master' of http://github.com/noqqe/bash-it into noqqe-master
commit
2d9da1f156
|
|
@ -32,12 +32,21 @@ pri() {
|
||||||
|
|
||||||
|
|
||||||
# disk usage per directory
|
# disk usage per directory
|
||||||
|
# in Mac OS X and Linux
|
||||||
usage ()
|
usage ()
|
||||||
{
|
{
|
||||||
if [ $1 ]
|
if [ $(uname) = "Darwin" ]; then
|
||||||
then
|
if [ -n $1 ]; then
|
||||||
du -hd $1
|
du -hd $1
|
||||||
else
|
else
|
||||||
du -hd 1
|
du -hd 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
elif [ $(uname) = "Linux" ]; then
|
||||||
|
if [ -n $1 ]; then
|
||||||
|
du -h --max-depth=1 $1
|
||||||
|
else
|
||||||
|
du -h --max-depth=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue