osascript command line utility. osasubr allows you pass arguments to an AppleScript subroutine.
zsh is the power user's interactive shell. It has incredibly powerful command (programmable) and file completion, and a host of other features that I can't even begin to describe.
vi style keys, look at this page.
contacts lets you access the Mac OS X Address Book from the command line.saysay command lets shell scripts (and any program that can exec other programs) have access to the speech syntesizer as well. man say for the details. I use say at the end of long running commands to let me know that the run has finished.ioreg -l | grep -i IOBatteryInfo.
The built in command pmset lets you display and modify the power management settings.
Look here for more 15" Powerbook battery info
nvram command lets you modify the Open Firmware Non-Volatile RAM settings. I used this to make my boot sequence more UNIX like (console w/ scrolling UNIX stuff) by doing sudo nvram boot-args="-v"pbcopy and pbpaste to manipulate the clipboard from the shell or a shell script./sbin/service command will let you enable and disable services from the command lineJAVA_HOME=/Library/Java/Homelookupd which caches all kinds of network related information, most notably DNS entries (no need to run a caching bind to get this). If you need to flush the lookupd cache for some reason, do sudo lookupd -flushcachelpoptions -p <printer-name> -o sides=two-sided-long-edge. In order to get lpr to recognize the name of the printer (it's connected over Ethernet via TCP/IP), I had to muck with entries in /etc/cups/printers.conf and I had to copy/rename ppds i /etc/cups/ppd. It was no fun, but it works.
sudo diskutil repairPermissions /sudo update_prebinding -root / -force. I did this once and my system acted very weird afterwards. I probably won't do it again.~/Library/Java/Extensions. Whether this is a good thing or a bad thing is up for debate.~/Applications directory instead of /Applications.sudo vi /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm
Change ld='MACOSX_DEVELOPMENT_TARGET=10.3 cc' to ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'
[ via ] MacZealots
/Applications/Utilitiesrmm script to get remove files to ~/.Trash rather than killing them.
You can mount shares in the Finder via Applescript code that looks like this:
tell application "Finder"
try
mount volume "smb://WORKGROUP;username:password@machine_name/directory"
end try
end tell
Automounting of shares in /Network is controlled by NetInfo -- you have to use the NetInfo Manager as described in this article. You need to supply a SAMBA url instead of an AFP url.
You can also mount using a shell script.
#!/bin/bash mount_smbfs //username:password@server1/home ./s1homeYou also want to unmount them when you go away / lid close You can unmount non local volumes in Applescript like this:
tell application "Finder" eject (every disk whose local volume is false) end tell
mod_rendezvous_apple