From owner-freebsd-questions@FreeBSD.ORG Wed Dec 17 17:55:41 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABF61065673 for ; Wed, 17 Dec 2008 17:55:41 +0000 (UTC) (envelope-from greenwood.andy@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 45F618FC0C for ; Wed, 17 Dec 2008 17:55:41 +0000 (UTC) (envelope-from greenwood.andy@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so12791ywe.13 for ; Wed, 17 Dec 2008 09:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=+gHTmb5Tsato7WelDq0RASnqourl4UC/NTdk6laaCTw=; b=IUDDML4UrQuS50x6hUbO6fulZc1IBAGdYk9Mn9vPrjy/P/wE8knglV7jJ/NgWf3yui OFnN9q1i+/Elye3m7AyWQuXh3E41NT9v0OSjw8Lqcydu93jJbkgEyqkKkCKRDYUVa/jO ipm5lTf9s+xsGLx+xnIe/OCgNtQs/1EeGlqq0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=eyTpzG1IQi//BXuYZ4QMD8iumK80qH8YHZqgHFBeRwNa6sYd+klvDplBkhI4SeIIlv 26MrEqIfjfYdZxHXaSfXfEUgIZdgZgjEyRRGQ3pOw2MIPp9W46a/mYqb4VRV5Dwk+/pj VIJiobkXzYJvfFNecuZ57hIlS1onTTjsqd32Y= Received: by 10.100.46.10 with SMTP id t10mr753464ant.136.1229535311678; Wed, 17 Dec 2008 09:35:11 -0800 (PST) Received: from hercules.nuvox.net (216.215.202.5.nw.nuvox.net [216.215.202.5]) by mx.google.com with ESMTPS id b14sm2795378ana.12.2008.12.17.09.35.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Dec 2008 09:35:10 -0800 (PST) Message-ID: <4949384D.2080508@gmail.com> Date: Wed, 17 Dec 2008 12:35:09 -0500 From: Andy Greenwood User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: John Almberg References: <283ACBF4-8227-4A24-9E17-80A17CA2A098@identry.com> In-Reply-To: <283ACBF4-8227-4A24-9E17-80A17CA2A098@identry.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: How to find files that are eating up disk space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2008 17:55:41 -0000 -----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-----