From owner-freebsd-questions Sun Aug 12 12: 8:39 2001 Delivered-To: freebsd-questions@freebsd.org Received: from Mail6.Carolina.rr.com (fe6.southeast.rr.com [24.93.67.53]) by hub.freebsd.org (Postfix) with ESMTP id 7F5FE37B406 for ; Sun, 12 Aug 2001 12:08:36 -0700 (PDT) (envelope-from jconner@enterit.com) Received: from snafu.enterit.com ([66.57.159.198]) by Mail6.Carolina.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Sun, 12 Aug 2001 15:08:16 -0400 Message-Id: <5.1.0.14.0.20010812151835.0572ee98@mail.enterit.com> X-Sender: jconner@enterit.com@mail.enterit.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 12 Aug 2001 15:30:57 -0400 To: Mike Meyer From: Jim Conner Subject: Re: Filesystem filling up, how do I locate the large files? Cc: Joey Garcia , questions@freebsd.org In-Reply-To: <15222.23256.445602.238142@guru.mired.org> References: <106282575@toto.iv> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 At 05:30 AM 08.12.2001 -0500, Mike Meyer wrote: >Joey Garcia types: > > Okay, I hope the subject made sense. Basically, my /usr is filing up and > > I wanted to located the large files or larger directories that are filling > > up the partition. I read somehwere in some FAQ or something that the > > command is something like this: du (some options) | sort (some more > > options) but I'm not sure exactly about what options to use. I have a > > feeling that I read this somwhere on one of the documentation found at > > freebsd.org but I just can't seem to find it again. Any pointers to that > > doucmentation would be awesome. I know I read it somewhere... > >How about the du and sort man pages? The options are all documented >there, which should be enough to figure out what you want. > >Hint: you want the size of all files on /usr and not other file >systems mounted on /usr, sorted numerically, and probably largest >values first. Another very helpful command is find. You could try something like: find /usr -xdev -size +1000000c -ls -type f This will tell you ever file on the filesystem /usr that is larger than one million bytes or 1 Mb and the file is a regular file. It will ls (list using similar to the -al options) the files it finds. From there you can even change the find command to do other things. man find(1). Excellent command! The du -h /fs | sort -rn is good too but it will take a long time and you have to make sure that you either send the output to a file. > -- >Mike Meyer 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 - Jim -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- http://www.perlmonks.org/index.pl?node_id=67861&lastnode_id=67861 -----BEGIN PERL GEEK CODE BLOCK----- ------BEGIN GEEK CODE BLOCK------ Version: 0.01 Version: 3.12 P++>*@$c?P6?R+++>++++@$M GIT/CM/J d++(--) s++:++ a- >++++$O!MA->++++E!> PU-->+++BD C++++(+) UB++++$L++++$S++++$ $C-@D!>++++(-)$S++++@$X?WP+>++++MO!>+++ P++(+)>+++++ L+++(++++)>+++++$ !E* +PP+++>++++n-CO?PO!o >++++G W++(+++) N+ o !K w--- PS---(-)@ PE >*(!)$A-->++++@$Ee---(-)Ev++uL++>*@$uB+ Y+>+++ PGP t+(+++)>+++@ 5- X++ R@ >*@$uS+>*@$uH+uo+w-@$m! tv+ b? DI-(+++) D+++(++) G(++++) ------END PERL GEEK CODE BLOCK------ ------END GEEK CODE BLOCK------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message