Spotlight Commands

Unix Commands

If you aren't familiar with Unix but can find a use for the above,
you will probably want to be aware of these standard Unix commands:

alias

bless

find

man

sudo

whereis

AppleScript Debugging Environment Variables

Do the following from a Terminal command line for a csh or tcsh:

setenv AEDebug 1

setenv AEDebugSends 1

setenv AEDebugReceives 1

Or do this for a sh, ksh, or bash shell:

export AEDebug=1

export AEDebugSends=1

export AEDebugReceives=1

Note that the default Terminal shell for OS X 10.0 through 10.2 is
tcsh, but they changed it to bash starting with 10.3.

Safari Debug Menu

Enable by entering this command from a Terminal command line:

defaults write com.apple.Safari IncludeDebugMenu 1

and disable by:

defaults write com.apple.Safari IncludeDebugMenu 0

Speed Up Sheets

defaults write NSGlobalDomain NSWindowResizeTime time

where time is a time in seconds from, say, .001 to 2.

Set Default Umask

defaults write /Library/Preferences/.GlobalPreferences NSUmask #

defaults write -g NSUmask -int #

The first sets the global, system default and the second sets the
per-user default. The NSUmask may not be honored by software that has
not been adapted for OS X. # is the umask (per
umask(2)). It may, however, be in decimal instead of
octal.

Set Whether to Show Hidden Files

defaults write com.apple.Finder AppleShowAllFiles YES

and, to put it back:

defaults write com.apple.Finder AppleShowAllFiles NO

You'll have to restart the Finder (or log out and log back in) for
this to take effect.

Set Login Window "MOTD" Text

Edit:

/Library/Preferences/com.apple.loginwindow.plist

Between the <dict>/</dict> tags,
insert a <key>...</key> and
<string>...</string> pair as: