du
eharetea

Lists folder size, in bash and freebsd.

Bash statement to retrieve folder size.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 04:42 PM


DU stands for disk usage.


UNIX
du -s text/
// lists size of folder named text

du -hs text/
/ prints human readable

-s option says do not list recursive



FREEBSD
du -d0
// lists current folder that you are in size in bytes

du -d1
// lists one level deep 

du -md0
// the -m flag shows size in megabytes

du -md0 | awk '{print $1 "M"}'
du -hd0
// these are the same, print Megabytes