Subject: Re: checking disk size
To: None <netbsd-help@netbsd.org>
From: Greg 'groggy' Lehey <grog@lemis.com>
List: netbsd-help
Date: 12/06/2002 11:34:49
On Thursday,  5 December 2002 at 19:53:32 -0500, Sam Carleton wrote:
> Folks,
>
> I am sure there is an easy way to do this, I simply don't know what
> it is...  How do I find out how much disk space a directory and
> it's contents are taking up?  I know about df to check volumes.

To see how much space a directory takes up, use ls -ld:

  $ ls -ld /usr
  drwxr-xr-x  17 root  wheel  512 Oct 26 11:50 /usr

To see how much space its contents take up, use du -s:

  $ echo $BLOCKSIZE
  1048576
  $ du -s /usr
  3499    /usr

The value is in units of BLOCKSIZE bytes.  If BLOCKSIZE isn't set, it
defaults to 512.

Greg
--
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers