Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Dec 2001 19:38:05 -0600
From:      Mike Meyer <mwm@mired.org>
To:        "Anthony Atkielski" <anthony@atkielski.com>
Cc:        questions@freebsd.org
Subject:   Re: How do I find major consumers of disk space on the system?
Message-ID:  <15370.55165.402323.615518@guru.mired.org>
In-Reply-To: <51108400@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help

Anthony Atkielski <anthony@atkielski.com> types:
> I see that there are lots of commands that tell me various things about the
> filesystems I have mounted and what is on them, but what is the best command or
> commands to use in order to locate the parts of the file hierarchy that are
> taking up the most disk space?  For example, I have 1.3 GB in use on the /usr
> filesystem; how can I find out which directories are using the most space
> (mainly with an eye to deleting stuff that doesn't really need to be there)?

du. For your specific example, I'd recommend "du -ax | sort -rn > /tmp/usr.space"
to get a list of all the files and directories on /usr, sorted by size.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15370.55165.402323.615518>