[Hidden-tech] Mac Tech question

Chris Hoogendyk hoogendyk at bio.umass.edu
Tue Dec 9 11:04:09 EST 2008



Jeff Rutherford wrote:
> Can someone answer this question for me. My hard drive is quickly 
> filling up, and I need to delete files, documents, etc. to free up space.
>
> How can I search across my entire hard drive (not just specific 
> folders) and sort files by the file size? So I can easily find the 
> largest files on my machine wherever they may be.

how are you with unix tools?

open a window in the terminal application. then enter:

 du -k /  2>/dev/null  |  grep  '^[0-9][0-9][0-9][0-9]'  |  sort -n  |  less

that ought to do it, though you might have to tweak it a bit to suit 
your fancy. It also may take a little while to respond, since it can't 
do the sort until it has all the results. But, it will result in a list 
of all the files on your system that are larger than a megabyte sorted 
by size. The largest ones will be at the end, where you can see them 
without scrolling up.

If you want to tweak that, you can make the first 0-9 into 5-9 and only 
get things that are 5M or larger. Or you can add another [0-9] and get 
only things that are 10M or larger.

Use that for reference as you browse through a finder window and decide 
what to toss.

Have fun.


-- 
---------------

Chris Hoogendyk

-
   O__  ---- Systems Administrator
  c/ /'_ --- Biology & Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst 

<hoogendyk at bio.umass.edu>

--------------- 

Erdös 4




Google

More information about the Hidden-discuss mailing list