How To: Check OS X Disk Usage

How To: Check OS X Disk Usage

In OS X there are two ways to do everything. Via the GUI, or Via the command line. Frequently the GUI method does fine for most uses. But sometimes a bit more information is needed.

In the GUI, getting Disc Usage is simple. Open Finder, click on the drive and look at the bottom of the finder window. The number of files selected and the space available is displayed. But, this only shows the current directory and includes ALL sub folders under it.

But with a little use of the command line we can get a lot more information. Opening terminal defaults to the active user’s home directory.

At this point type du -sh * We’re adding the s for “Display an entry for each specified file,” and h for “Human-readable” output.

This will give a readout like this:
28G Desktop
41G Documents
13G Downloads
3.9G Library
0B Movies
5.1G Music
42G Pictures
121M Public
374M Sites

As can be seen this then gives a readout of each directory in the current one and provides the total space it takes up. In cases of low hard drive space this gives a good way to quickly find folders that may be too big. It could also be run in the /Users folder on multi-user machines to find out who it using all the hard drive space.

How to: Run Gimp from Linux Machine and display on Mac OSX

How to: Run Gimp from Linux Machine and display on Mac OSX

Unix machines are known for their great versatility in configuration, and their “power”. Traditionally Unix machines were “headless” or without a monitor or other display device except for Terminals. These days another whole computer can replace the terminal. But Unix machines as the whole tend to be pretty beefy machines when it comes to CPU and RAM. Instead of just using it as a glorified File Server, with a few simple commands they can used to run pretty complex pieces of software such as the Gimp.

On the OS X side make sure you’ve got X11 installed. Follow the XCode Install Directionshere.

Once that is done, launch an X11 window and type ‘xhost +’ or optionally ‘xhost +machinename’ or ‘xhost +username’ xhost allows other computers to use your X11 program as the display instead of their own display. The + means everybody which might be bad for security, but good if you’re going to be using a lot of different machines. Looking at the man page it can be limited to just machine name or even specific users names.

Login to the remote machine using ssh or telnet.

type ‘setenv DISAPLY :0.0’ in a tsch or csh shell. Bash will not work. This tells the remote machine to redirect it’s display to your machine.

Launch software! In this case just type gimp, but you may have to type in the full path to the software.