Terminal Tips
Terminal Tips: Change Safari’s history limit
Are you tired of not being able to see all of your browsing history in Safari? Well, with this Terminal hack, you can easily change how many items (or how many days) Safari shows in the History menu. To do this, just open Terminal (/Applications/Utilities/Terminal) and type in one of the following commands:
Limit to number of items:
defaults write com.apple.Safari WebKitHistoryItemLimit 2000
Limit to number of days:
defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30
You can you can also use both commands to get both a day and an item limit.
Popularity: 4% [?]
Terminal Tips: Force email to be plain text
There are some people that like the sleekness of HTML email, then there are those that appreciate the simplicity of plain text email (no images or styled text, thanks very much). If you use Mail.app and want it to force all incoming email to display as plain text, then open Terminal (Applications > Utilities) and type in the following command:
defaults write com.apple.mail PreferPlainText -bool TRUE
Now when you receive an email, Mail.app will only show you the plain text of the message. To reverse this command, just replace “TRUE” with “FALSE.”
Popularity: 3% [?]
Terminal Tips: Modify iTunes arrow links
Do you know those little arrows that appear in iTunes when you have a song selected? You know, the ones that appear just after the title of the song, artist, and album and link to the iTunes Store when clicked? Yeah, those! Well, if you want the arrows to link to your iTunes library instead of Apple’s induced store (and another impulse purchase), then just type the following command into Terminal (found in Applications > Utilities):
defaults write com.apple.iTunes invertStoreLinks -bool YES
To change things back to normal, just replace the YES in the above command with NO.
Want to see more tips like this? Visit Apple@CooOne’s Terminal Tips and Apple@CooOne’s Tips sections.
Popularity: 3% [?]
“Utility of last resort” AppleJack updated for Leopard compatibility

You may sincerely wish never to need it, but if you run into a situation where your Mac refuses to boot fully to the Finder and you don’t have any boot-capable utilities to tackle the problem, Kristofer Widholm’s AppleJack is probably your best friend in the trenches. The single-user-mode tool is only available if you start your machine while holding down Cmd-S to boot to the command line (as per Dave’s tip from yesterday), but once there it streamlines the process of checking your disk for errors, repairing permissions, cleaning caches, zapping corrupt preference files, and deleting leftover virtual memory swap data. You could do most of this yourself via a series of commands, but AppleJack is a) much, much simpler and b) completely free and open source.
For a long while it didn’t look as though AppleJack would make the leap from Tiger to Leopard, as Mac OS X 10.5 made some key changes that broke AppleJack’s functionality (specifically, the ‘id’ command didn’t work, and the /etc/rc file was removed). Developer Steve Anthony jumped into the project this summer and was able to code around the Leopard-specific problems, finally giving us back our beloved AppleJack in version 1.5.
Let’s all raise a glass of the original Jersey Lightning to Kristofer and Steve for their work on behalf of Mac troubleshooters everywhere. [Read]
Popularity: 4% [?]
Tip: Create an OS X admin user without a disc
Recently, I had to create a new admin user on an older 500mhz Power Mac G4 running OS 10.3.9. Needless to say, there was no 10.3 install discs to be found. What to do? Follow these simple (but powerful) steps.
First, restart the Mac while holding down the Command and “S” keys to start in Single-User Mode. Next, you’ll see the UNIX boot sequence in white text on a black field. Don’t worry, that’s what we expected. At the prompt, type the following commands, hitting “Return” after each.
- mount -uw /
- rm /var/db/.AppleSetupDone
- shutdown /h now
Please be sure to type these commands exactly as presented here (sans bullets). “rm” is a powerful little command and if the syntax isn’t right, you might unintentionally delete something important. Next, your machine will shut down. Turn it back on and you’ll see the “Welcome to OS X” video, and be prompted through the process of creating a new admin user.
Other users on that machine — including other admin users — will remain intact. This is also a good way to change the password on an older admin account without the disc. Simply follow the same steps and, once you’ve logged in with the new account, change the password on your old account. Then, log in as the old account and delete the new one.
Popularity: 4% [?]

