Search

Top Posts

Comments

  • Ross Mungall: Hi there, Notify is great app, much better and nicer than Gmail Notifier.. but its not working with any...
  • mayank: i am having a problem with my macbook airport. it cannot open most of the sites, the reason always shown is...
  • Anon A Moose!: Working in Apple tech support, this tool is freaking invaluable. Do you know how many people call...
  • kyle: hi im mac and im a pc!!!!
  • TheWalrus: Great, thanks for this. Having just started using a Mac as well as my Ubuntu machine, it’s good to...

Categories

Recent Posts


Mac Terminal


Tips and tricks for the Mac Terminal & Command Line

The Terminal in Mac OS X is how you access the Unix underpinnings of Mac OS X, through the command line you can enable various hidden features, troubleshoot, and much more. The Mac Terminal is generally to be used by advanced Mac users, so proceed with caution.

All 'Command Line' articles:

Disable Dock Bouncing

The bouncing Dock icons are a nice GUI feature but for some people they’re just really annoying. You can disable the Dock icon bounce notifications in Mac OS X by using the command line, so launch Terminal and enter the following:
Disable Dock Bouncing:
defaults write com.apple.dock no-bouncing -bool TRUE
killall Dock
Re-enable Dock bouncing by entering these commands:
defaults [...]

TTYtter, the command line Twitter client

TTYtter is a rather fun command line based Twitter client. Written in Perl, it’s got all the essential ingredients needed for basic Twitter needs without ever leaving a Terminal window.
Running TTYtter is easy enough, it just needs your login information and off it goes. You can either run it through perl with:
perl /path/to/ttytter.pl -user=username:password
or [...]

Disable access to System Preferences

In trying to lock down the machines in a small Mac lab, I came across an interesting piece of advice from John Mairs who was tasked with basically the same thing. He suggests disabling access to System Preferences because it “accomplishes (and halfway accomplishes) several things. First, it completely prevents students from changing all settings [...]

Change the delay when dragging windows within Spaces

Spaces is a really nice feature of Mac OS X that lets you place different windows and applications within their own workspace. Dragging a window to a new Space is just a matter of holding onto the window and pulling it towards the end of the screen. You may have noticed that there’s a [...]

Go back to the previous directory via command line

It’s easy to accidentally change directories to something you weren’t intending to (say, accidentally hitting cd and returning home and losing your place in a complicated directory structure), but thankfully there’s a command that will immediately take you back to the previous directory:
cd -
It’s that simple, cd – will take you to the directory you [...]

Lock the Dock in Mac OS X

Here’s how to lock down the Mac OS X Dock, all of these commands need to be issued at the command line via the Terminal, so once you’re there enter the appropriate command:
Lock the Dock to Prevent Changes to Contents
defaults write com.apple.Dock contents-immutable -bool yes
Lock the Dock to Prevent Changes in Size
defaults write com.apple.Dock size-immutable [...]

Track an applications usage in Mac OS X with opensnoop

Using the command line tool ‘opensnoop’ you can track any Mac applications (or system process) usage of the file system. This is a very handy tool for administrators and troubleshooting! The simplest way to use it is as follows:
sudo opensnoop -n Safari
You can also track a specific file, and what is accessing it, like so:
sudo [...]

Use your Mac as a psychotherapist

Yes, you read that right. You can use your Mac as a psychotherapist from the Terminal, thanks to emacs. It’s pretty amusing, and here’s how to do it:
* Launch the Terminal
* Type ‘emacs’ and hit return
* Press Shift+Escape keys, then hit X
* Type “doctor” and hit return
* Mac psychotherapist to the rescue! See the screenshot [...]

Change the Dock item click-and-hold behavior in Snow Leopard

Snow Leopard changed the way the Dock behaves when a Dock item has been clicked on and held down, since 10.6 it launches Expose for that specific application. You may recall how Leopard handled the click-and-hold though, which was to launch the contextual menu (the same one you get when you right-click in 10.6). Using [...]

Schedule sleep and wake from the Terminal

Like many of us, I’ll be quite busy over the Christmas holiday visiting friends and relatives out of town. I regularly use my home machine as a local fileserver though and other people in the household are dependent on it being up and running. Now here’s the situation I’m presented with: I leave town [...]