On Sun, 12 Jan 2003, Oded Arbel wrote:

> On Sunday 12 January 2003 10:57, Shoshannah Forbes wrote:
>
> > Is there any utility out there that can help me figure out what is
> > using all my HD space and what can be removed safely, without making a
> > mess?
>
> An automated one ? not that I can recall.
> but you can always use `du -Hs` to look at each directory's disk usage and see
> where you waste all the space and then decide if you want to delete it.

My 2c:

du -scH /path/to/check/*

('H' is optional. It will somnetimes make the output more readable, but
sometimes 'k' or nothing at all will give you a better idea, because "32M"
and "323" don't look very different)

or:
du -scH /ath/to/check/* |sort -n

Then you find the subdirs with most content, and see which of their
subdirs takes everything, with a command similar to the above.

A note about performance: Typically the first time you run 'du' (with
whatever switches) on a certain subtree it will read the file siszes of
all the files from the disk, and thus will take relatively long. But on
later runs you can generally expect for the relevant data (the inodes, in
this case) to remain in the cache, and thus any further runs on the same
tree or a subtree are expected to take a much shorter time.

-- 
Tzafrir Cohen
mailto:[EMAIL PROTECTED]
http://www.technion.ac.il/~tzafrir


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to