[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Space problems on a machine



Tom Knight-Markiegi <tom [at] tomk.homelinux.org> writes:

> On Tue, Nov 11, 2003 at 12:19:02PM -0000, Rob Keeling wrote:
> Hi
>
> [snip]
>> does not look good. how do I free up space on /?
>
> To see what's taking up lots of space try:
>
> sudo du -h --max-depth=3 --exclude=boot --exclude=backup / | egrep '.*M'
>
> This should list directories with over 1MB of stuff in them, you may find
> somewhere which is using more space than it should, often due to messing up
> redirection with > (in my case). Sometimes /root/ gets filled up with junk
> if a program outputs to $HOME and you're runninng it as root.

Perhaps easier and more useful is:

du -x / | sort -n

Which just scans / and then provides a sorted list with the largest at
the bottom, usually the problem is pretty evident.

-- 
Eric E. Moore

Attachment: pgp00004.pgp
Description: PGP signature