Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2008 12:35:09 -0500
From:      Andy Greenwood <greenwood.andy@gmail.com>
To:        John Almberg <jalmberg@identry.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to find files that are eating up disk space
Message-ID:  <4949384D.2080508@gmail.com>
In-Reply-To: <283ACBF4-8227-4A24-9E17-80A17CA2A098@identry.com>
References:  <283ACBF4-8227-4A24-9E17-80A17CA2A098@identry.com>

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Almberg wrote:
> Here is another newbie question that is driving me crazy, but is
probably a laughable situation to an experienced admin...
>
> I've got a smallish server that is suddenly out of disk space in the
'/' partition.
>
> Probably some log files have gotten out of hand. I am going to start
looking for the culprits by hand... basically inspecting sub
directories, but there must be a better way!
>
> Is there a command line tool that will help me figure out where the
problem is?
>
> Even better, is there a way to proactively monitor the file system, so
I can fix problems before I start getting 'out of disk space' errors?
>
> Any hints, much appreciated.
>

John,

try man du. It will give you file sizes of all the files in a directory
tree, which you can then pass to sort and head to pull out the biggest
offenders, like this

# cd /
# du | sort -rn | head -10

for monitoring my system, I use tripwire, but that might be a bit much
just for watching disk usage. Try putting a "df -h" in your periodic
scripts to have the output of that command mailed to you each day.
> -- John
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe@freebsd.org"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklJOE0ACgkQEStKVA82Z+1tNgCdHSAYcm5A6sTjbjjHmzL3ynS2
C+0Anim0sf0yIz/l7TVNtdA5a5JbM+Jz
=xetm
-----END PGP SIGNATURE-----




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