Friday, May 16, 2008

Why is everything crashing?!

Every so often it happens that a visibly flustered patron comes up to desk and complains that the cluster Mac she's been using is extremely slow and programs are crashing on it left, right and center. In nine out of ten cases, this is because said patron's AFS space, i.e., the meager 200 megabytes of online storage Stanford provides to students (in 2008!), is full, which usually causes Macs to go completely haywire. So, if your Mac is going haywire because your AFS is full and you want to find out how to clean it up to recover space, follow the instructions below.

The Finder Way
The first step is to log on to a Mac, open a Finder window and click on your home folder in the sidebar (unless you're already there). Most Macs open Finder windows in Icon View by default and you will need to switch to Column View, either by using the keyboard shortcut Command-2 or by clicking the icon in the toolbar, in order to see where all the space is being taken up. After doing that, the Finder window should look something like this:

Of course, the problem here is that, since everything is a folder, all the file sizes come up as "--", so we still don't know where all the space is going! This is easily remedied by selecting Show View Options from the View menu and checking the "Calculate all sizes" box. Finder should now start calculating the size for each folder one by one. The last thing to do would be to sort the list by the Size column by clicking on it, so that you can quickly locate the culprit taking up the most space, like this:

Also, if you want to see what files within a certain folder are taking up the most space, instead of double-clicking on the folder, click on the arrow to the left of its name, which will open it up within the same view, like this:


The Terminal Way
As it turns out for a lot of tasks, there is often a faster way to do something if you use the command-line, so if you're comfortable using the Terminal on the Mac or SecureCRT on Windows, here's a command that lists all the files and folders inside the current folder with their total sizes: du -hs *

Using the du command, the output looks something like this on the same home folder you saw in examples above:


And just a quick reminder - checking AFS space on Macs is simple with Joe's App. Alternatively just open terminal and type in "fs lq."

Happy Spring Cleaning!

No comments: