Skip to Content

Free TUAW iPhone app -- try it now!
AOL Tech

terminaltips posts

Filed under: Terminal Tips, TUAW Tips

TUAW Tip: Moving your home folder to another disk (or moving it back)

In ye olde times, with "Mack OSe 9," many users chose to keep their personal files, work, and documents on a different physical disk from their startup disk. It was a safety measure: If one disk goes down, at least the other won't. There was no structural reason to keep files in a particular disk location, other than keeping them out of the System Folder.

I visited a client yesterday whose drive scheme was set up exactly like this, and he wanted to be (finally) upgraded to Leopard. I wasn't sure how Leopard would handle the fact that his Users folder had been moved to a different drive, so (knowing I had backups of his entire system) I cautiously proceeded with the installation.

After the installer finished, Leopard had created a fresh, blank Users folder on the startup disk with a home folder bearing the same username. This wasn't exactly the answer I was looking for. I had to link, somehow, the new Users/hisname folder with his existing user folder on the other volume.

Turns out, Leopard handles this much better than previous versions of Mac OS X. Read on to find out how.

Continue readingTUAW Tip: Moving your home folder to another disk (or moving it back)

Filed under: Hacks, Internet Tools, Terminal Tips

Safari 4 hidden preferences

There's quite a debate going on in the Mac web over Safari 4's new user interface. Personally, I think the new tab implementation is hideous, so I was glad to see that Caius Durling has discovered a bevy of hidden preferences for Safari 4.

With a few quick Terminal commands you can restore sanity to your tabs, bring back the old URL completion behavior, remove CoverFlow from the Bookmarks view, and few other neat tricks. On the other hand, if crazy tabs float your boat, they're easy enough to restore in the same way.

[via Download Squad]

Filed under: iLife, Terminal Tips

iLife Tip: Enable Multi-Touch maps in iPhoto '09

After using iPhoto '09 for a couple days, I have come to love the new features, in particular the Places feature. However, one thing that annoyed me is that you cannot use the Multi-Touch feature on newer MacBooks to manipulate the maps (zooming in/out, etc.).

However, thanks to a Tweet-tip from Steven Troughton-Smith (@stroughtonsmith), there is a way to enable this functionality. To add Multi-Touch maps to places in iPhoto '09, just open Terminal.app (/Applications/Utilities) and type (or copy/paste) the following statement and press enter:

defaults write com.apple.iphoto MapScrollWheel -bool YES

When you restart iPhoto, you will notice that you are now able to scroll in/out of the Places maps with ease. If it turns out that you don't want the scrolling feature, just retype the statement, replacing "YES" with "NO."


Thanks for the tip, Steven!

Continue readingiLife Tip: Enable Multi-Touch maps in iPhoto '09

Filed under: Terminal Tips

Terminal Tip: Enable half-star ratings in iTunes

Do you like giving ratings to songs in iTunes? If so, then you've probably noticed that you are only able to rate songs on a full-star basis, not enough granularity for some music fans... there's a longstanding AppleScript hack to enable half-stars, but now there's an easier way around this issue. Macworld's Rob Griffiths found a work around, involving a simple Terminal tip to enable half-star ratings.

To enable half-star ratings, close iTunes, and open Terminal (/Applications/Utilities). Once you have Terminal opened, type the following command and press enter:
defaults write com.apple.iTunes allow-half-stars -bool TRUE
When you reopen iTunes and rate a song, you will be able to give half-stars. That simple. If you wish to make things normal again, open Terminal and type the same command, replacing "TRUE" with "FALSE."

Filed under: Terminal Tips

Terminal Tip: Change Time Machine backup interval

Sometimes you want your Mac to be backed up more frequently than usual. If you want to instantly back up using Time Machine, you could click on the menu bar item and select "Back Up Now," but what if you want to change the backup interval indefinitely? With this Terminal Tip, you can do just that.

Time Machine is set to automatically back up every hour, but if you would like to change it to every half hour, you can use the following Terminal (/Applications/Utilities) command:

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800

You will need to authenticate as an administrator, since this command is run under a "sudo." The time interval is measured in seconds, so you can enter any time you wish there; just make sure it is in seconds. By default, Time Machine backs up every 3600 seconds (every hour). If you wish to revert to the original, just replace "1800" with "3600."


Want more tips and tricks like this? Visit TUAW's Terminal Tips section!

Filed under: Terminal Tips

Terminal Tips: Play Tetris in Terminal


Terminal boasts some cool, but hidden features that we like to call "Easter eggs." These "eggs" are hidden features that the developers build in (mostly for fun or laughs), that don't have anything to do with the functionality of the program.

One of these "eggs" is the ability to play Tetris in Terminal. Here's how to do it. First, open a new Terminal.app (/Applications/Utilities) window and type "emacs," then hit enter. After the screen loads, press "escape," then "x." Type "tetris" (lower-case) and hit enter. There you have it, a fully playable game of Tetris. Use the arrow keys to control the blocks.


Want more tips and tricks like this? Visit TUAW's Mac 101 and Terminal Tips sections.

Filed under: Terminal Tips

Terminal Tips: Make extended print dialog show by default


When you print something in Mac OS X, the standard print dialog window will pop up. However, if you always use the extended options (such as landscape/portrait orientation, number of copies, etc.) then you might have to click the blue arrow constantly. With this Terminal hack, the print dialog will open with the extended options already shown by default. Just open Terminal.app (/Applications/Utilities/) and type in the following command:

defaults write -g PMPrintingExpandedStateForPrint -bool TRUE

If changing back to the original settings makes you happy, then replace "TRUE" with "FALSE" in the command above.

Want more quick Mac tips like this? Visit TUAW's Mac 101 and Terminal Tips sections.

Filed under: Hacks, Tips and tricks, Terminal Tips, TUAW Tips, Leopard

TUAW Tip: Highlight items in gridded stacks

Highlight gridded stacks
The Dock's Stacks feature lets Leopard users view a folder's worth of stuff with one click. You'll either love it or hate it, use it or not. If you do use it, here's a little tip that improves it slightly (in my opinion).

When you've got a bunch of files from a Stack displayed in Grid View, it can be hard to spot the particular one you're looking for, especially if many of them look identical (such a collection of text files or word processor documents).

Luckily, there's a highlight you can switch on, that puts a whiter background around the file you're mousing over. It makes it slightly easier to ensure you click on the correct file.

The highlight appears normally if you use the arrow keys to move around a Grid, or if you type Command and the first letter of one of the files displayed. But this trick switches it on permanently, so that it is always in action whether or not you use these keyboard shortcuts.

Read on for all the commands.

Continue readingTUAW Tip: Highlight items in gridded stacks

Filed under: Terminal Tips

Terminal Tip: Command Line Calculator

Mac OS X ships with a powerful and useful command-line calculator called bc. GNU bc provides an arbitrary precision calculator that allows you to type in expressions for immediate calculation. It uses the standard conventions for computer arithmetic, i.e. + and - are addition and subtraction, * and / are multiplication and division, ^ is exponentiation. So to multiple, say, 193 by two thirds, you'd enter 193 * 2 / 3 and press return. Parentheses set the order of evaluation, just as they would in a normal arithmetic statement or in a computer language. e.g. (20 / 3) ^ 5 performs the division before the exponentiation.

You can also use variables with bc. Just assign them using an "=" command. For example, you can set your principal to 100 with principal=100. The special scale variable indicates the number of digits to show after the decimal point. Enter quit to leave bc.

There's a lot more you can do with bc--it's really a full interactive programming language that goes way beyond the simple convenience of quick calculations. To learn about bc, type man bc from the command line.

Filed under: UNIX / BSD, Terminal Tips

Monday man page: ls

There are two kinds of Mac folk: them that finds this "Terminal" thing strangely fascinating, and them what considers it the worst kind of wicked magic, not to be trifled with. Here at TUAW we've got all kinds, and for anyone who might be curious about the power and possibilities of the command line, we're going to provide some weekly quick tips and suggestions for introductory use. Always keep in mind, though, that the damage you can do from Terminal is effectively unlimited, especially with administrative access. Best to play around in a 'dummy' account until you have your sea legs.

Even before we start, an explanation of the title: 'man pages' are the BSD UNIX manuals, already tucked away on your Mac. You can type "man command" in Terminal for a detailed (not to say overwhelming) rundown on any command-line tool. As we've mentioned before, an excellent intro to Terminal in Tiger can be found over at the O'Reilly Mac Dev Center. We also posted about Unix for the Beginning Mage, an amusing beginner's guide to the plumbing under Mac OS X.

Our fine feathered friend today is 'ls' -- the UNIX directory list command. Read on for more...

Continue readingMonday man page: ls

Filed under: Software, Terminal Tips

10 Little Known Command-Line Utilities

OS X Daily has a nice list of OS X command-line utilities today that you may have forgotten about or might never have encountered. For example, the article suggests using ifconfig to check your IP address or lsbom to peek at the contents of an OS X installer package. If the notion of extending your command line vocabulary appeals, it's worth a visit to this quick article. You might pick up a trick or two you can incorporate into your day-to-day routines.

Filed under: Tips and tricks, iBook, PowerBook, Terminal Tips, Macbook Pro, MacBook

Terminal Tip: Keep your Mac portable from waking when the lid is opened

Although I'm a Mac Geek by trade, I tend to avoid the terminal unless I'm out of other options. I'm a GUI kind of girl. It's the Mac OS that I love, not its Unix underpinnings. I appreciate the power of the command line - I just don't want to spend all day there. Still, once in a while I come across a tip like the one, which Glenn Fleishman posted in the most recent TidBITS, and I find myself unable to resist the urge to fire up the Terminal.

This tip solves a problem that I've experienced myself and many of my clients have complained about - laptops waking from sleep while in their cases because the latch won't keep the lid closed. This can cause overheating, which can lead to a variety of other problems, like hard drive failures, etc. My solution is, of course, to fix the latch! But there are times when that isn't convenient and even if it's convenient it doesn't happen often enough for some people to even bother stressing about it. By harnessing the power of pmset, the command line app that controls power management settings, you can fix it so that your sleeping beauty stays asleep, even when the latch isn't doing its job.

The command is an easy one - a single line. Ready for it?

sudo pmset lidwake 0

By setting the lidwake value to 0 you prevent the machine from waking until you tap a key on your keyboard, and since the value gets written just to a plist file, it takes hold right away. Of course you'll need administrator privileges since you'll be asked for an admin password before the command is executed.



For more pmset options, have a look at the "man" pages at Apple's Darwin Reference library, or open your Terminal and type "man" (without the quotes), hit return and then type "pmset" (without the quotes.)

Tip of the Day

To get an instant map to any address, just go to your Address Book and right click on the address field of any one of your contacts and select "Map Of." The address will then be revealed in Google Maps on Safari. You can do the same if a data detector determines there is an address in an e-mail in Mail.


Follow us on Twitter!
 TUAW [Cafepress]

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
Storyist 2.0
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor

 

More Apple Analysis

AOL Radio TUAW on Stitcher