[Hidden-tech] Mac Tech question

Chris Hoogendyk hoogendyk at bio.umass.edu
Tue Dec 9 12:36:42 EST 2008



Seth Seeger wrote:
> I'm pretty sure that there are some GUI tools to do this, but if 
> you're comfortable on the command line, try this:
>
> sudo find / -size +300M -ls | sort -n -k +7
>
> That will find any files over 300MB and sort them by size. 

cool.

In unix there are almost as many solutions as there are sysadmins. ;-)

Seth's is probably faster and more direct than mine for finding 
particularly offensive large files like software distributions in .iso, 
.zip, .dmg, and so on. Faster bang for the buck, and, of course, you can 
adjust the 300M to suit your needs.

You can also do some of that in the finder. Pull up a finder window and 
type "dmg", for example, in the spotlight field at the top right. Then 
click on the column heading for "Kind" to sort by kind of file. The 
"Disk Image" files will all group together. The other files are there 
probably because dmg was referenced within the file. Click on "File 
Name" in the header to not see those.

Seth's use of "sudo" will avoid the errors (can't access blah) by giving 
root privileges, but will require the password of an admin user. You 
probably are an admin user unless someone else set up the computer and 
restricted the access of your account. I chose to throw away the errors 
( "2>/dev/null" ), figuring that you could delete files that you could 
access and probably shouldn't mess with others.

If you want to do a more thorough job of cleaning, my method (repeated 
below) with "du" (disk usage) will tell you what directories contain the 
most stuff as well as identifying the individual large files. So, if you 
have a folder full of old pictures that individually are below your 
search size threshold, but taken together are humungous, you would see 
that. Then you could choose to put all of those out on a DVD or CD and 
remove them.

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

As far as general system crud, Smith Micro has a neat product called 
Spring Cleaning: http://my.smithmicro.com/mac/springcleaning/ . It is 
relatively inexpensive, and I've been meaning to buy a copy for my 
daughter's iBook, but I haven't gotten around to it.


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

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