Date: Sun, 12 Aug 2001 15:30:57 -0400 From: Jim Conner <jconner@enterit.com> To: Mike Meyer <mwm@mired.org> Cc: Joey Garcia <bear@buug.homeip.net>, questions@freebsd.org Subject: Re: Filesystem filling up, how do I locate the large files? Message-ID: <5.1.0.14.0.20010812151835.0572ee98@mail.enterit.com> In-Reply-To: <15222.23256.445602.238142@guru.mired.org> References: <106282575@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
At 05:30 AM 08.12.2001 -0500, Mike Meyer wrote: >Joey Garcia <bear@buug.homeip.net> 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 >-- >Mike Meyer <mwm@mired.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20010812151835.0572ee98>