[X4U] Drive space utility

John Daschbach jldasch at mac.com
Wed Apr 13 21:42:20 PDT 2005


I suggest a "pesky Unix command"

du -k / | sort -n

du => Disk Use
-k  => report in kilobytes
/   => start at the root directory
|    => pipe output into next command
sort => sort the data
-n  => numerically

You can of course change the initial directory to anything you want, or 
cd to the directory at the top of the tree you are interested in and 
omit the directory argument.  This "neat little program" is standard 
Unix thinking.  Small programs that do one thing, and do it well, 
connected by the shell.  You might be amazed at the power at your 
finger tips with only the standard Unix utilities and a decent shell.  
(of course the choice of shell will cause flame wars, your generally on 
the csh  [tcsh] side or the sh [bash] side).  In 10.2 the default was 
csh, in 10.3 it's bash.  There are many ways to make this fancier, like 
using Perl, Python, Ruby, Tcl, Ocaml, etc. to execute and filter the 
commands.  You will get some errors on protected directories unless you 
run as root, or sudo the du command.

-John



On Apr 13, 2005, at 11:39 AM, Rad Craig wrote:

> I found a neat little program the other day that displays all the 
> directories/folders on your drive, sorted by drive space.  Makes it 
> very easy to find out where all that drive space went and delete old 
> junk.  Unfortunately it was for Windows only, but thats what I needed 
> at the time.  Now I would like to do the same thing to my Mac.  Does 
> anyone know of such an app?
>
> Where I can see which directories/files are taking up the most space 
> so I can delete them if I don't need them?  You know, like those pesky 
> unix kernels.  :)
>
>
> Rad...
>
> _______________________________________________
> X4U mailing list
> X4U at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x4u
>
> Listmom is trying to clean out his closets! Vintage Mac and random 
> stuff:
>         http://search.ebay.com/_W0QQsassZmacguy1984



More information about the X4U mailing list