Mac OS X Tips & Tricks
Tip

To create a 600M sparse/encrypted OSX volume:

  $ hdiutil create -size 600m -encryption -type SPARSE -fs HFS+ <filename>
                    

At any time you can reduce the sparse image size down to the minimum size needed to contain the files within it, by running the following:

  $ hdiutil compact </path_to/sparse.filename>
                    
Tip

To change a user's shell (to Bash, for example) on OS X:

  $ sudo niutil -createprop . /users/USER shell /bin/bash
                    
Tip
  • Command+Shift+3 => grab screen to .pdf file on desktop
  • Command+Control+Shift+3 => grab entire screen and place in clipboard
  • Command+Shift+4 => grab region of screen to .pdf file on desktop
  • Command+Control+Shift+4 => grab a region and place it in the clipboard

When grabbing a screen region, you can press the spacebar to invoke the camera cursor. As you move the camera cursor around the screen, windows will highlight. Click to capture the highlighted window.

Tip

There is a noticeable delay when running the "sudo" command on OS X v10.2 (Jaguar). This is due to a connection that is made to the security server. This can be safely avoided by changing the file /etc/pam.d/sudo. Comment out the following line, like so:

  #auth       sufficient     pam_securityserver.so
                    
Tip

Put QuickTime in full screen mode:

  tell application "QuickTime Player"
        enter full screen display 1
        set the scale of movie 1 to screen
        play movie 1
  end tell