From owner-freebsd-questions Sun Dec 2 17:38: 8 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id D188E37B417 for ; Sun, 2 Dec 2001 17:38:05 -0800 (PST) Received: (qmail 93150 invoked by uid 100); 3 Dec 2001 01:38:05 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15370.55165.402323.615518@guru.mired.org> Date: Sun, 2 Dec 2001 19:38:05 -0600 To: "Anthony Atkielski" Cc: questions@freebsd.org Subject: Re: How do I find major consumers of disk space on the system? In-Reply-To: <51108400@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Anthony Atkielski 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. 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