Logo Rob Buckley – Freelance Journalist and Editor

Turbocharge your Mac

Turbocharge your Mac

Suffer sluggish performance from your Mac no longer. This detailed feature will show you how to make your Mac run faster, how to streamline your OS for top performance and maximum disk space, and reveals some Unix trickery to make your system really fly.

Page 1 | Page 2 | Page 3 | Page 4 | All 4 Pages

Terminal is a direct conduit to Unix and is quite frightening. Do not be frightened however. With a few rules to guide you, the Terminal is not that scary. And it has lots of advantages once you get used to it. For one thing, it’s free, unlike many “tweaking” applications, and is available on every OS X Mac, including those without an Internet connection. You can use it to log into other Macs that have Remote Login enabled in their Sharing system preference pane and you’ll be able to use the exact same commands on those Macs. It can be a lot quicker than working your way through menus, tabs and other graphical delights. And if no one’s written an application yet to tweak your Mac the way you want it, you can almost always use Terminal to achieve the result you want.

So rule number one of Terminal: all commands are case sensitive, so typing “cd” is not the same as typing “CD” – one will change your directory, the other won’t. So be sure to follow any instructions exactly when dealing with Terminal.

Rule number two: if in doubt, check the manual first. In typical Unix fashion, typing something obvious like “help” (or “HELP”) won’t work. To get help, you need to type “man” which is short for manual, logically enough. And you can only get help about specific commands, not about using Unix in general, so don’t bother typing “man” by itself. If you’re not sure what command you want, type “apropos” and a subject (for example, “apropos network”) to get a list of possible commands.

Rule number three: always follow the instructions exactly. “rm” – short for “remove” – is the Unix delete command and will delete lists of files. So if you type “rm cow1 cow2”, the files “cow1” and “cow2” will disappear immediately (not into the Trash – there is no Trash in Unix, just oblivion) from your current directory (type “pwd” to work out what that is). If there’s an error, it will keep going. Now, you can also use things called “wildcards” to save on the typing: typing “rm cow*” will delete any file beginning with “cow”, including “cow1” and “cow2”. So what happens if you accidentally slip in a space and type “rm cow *”? You guessed it: first, Unix will try to delete the file “cow”. Even if you don’t have one, it will carry on with the next item in the list, which is “*”. Since every filename consists of one or more characters, Unix will delete every file in your current directory (except for files beginning with a full stop). So make sure that you’ve typed the command exactly (if you’re not sure, go back to rule two).

With that in mind, you can safely use Terminal to move your Users directory to another disk. Type the following, substituting your username for “username” and the name of the other disk for “OtherDisk” :

“sudo ditto -rsrcFork /Users /Volumes/OtherDisk/Users”

“sudo niutil -createprop / /users/username home /Volumes/OtherDisk/Users/username”

The “sudo” command lets you run any other command as if you are the super-user; “ditto” duplicates a file; and “niutil” accesses your Mac’s NetInfo database to make changes. These two commands have copied your whole Users folder over to the new drive and then instructed the Mac to modify the NetInfo database to look in the new location for your home directory. (You’ll need to repeat the second command, similarly modified for each user, if there’s more than one of you using the Mac)

Don't go on until you're sure the new user directories are working OK. You should log out/back in to check this. Once you’re sure everything is okay, type the following to remove the old Users directory and put an alias to the new one in its place:

“sudo rm -dr /Users”

Page 1 | Page 2 | Page 3 | Page 4 | All 4 Pages

Interested in commissioning a similar article? Please contact me to discuss details. Alternatively, return to the main gallery or search for another article: