The man utility is an ancient and good way of documenting command line tools in Unix. Â The downside is that it will display it in some sort of Unix pager, and I can never figure out how to go back up a page. Â This can be a pain when you are going through a ton of switch descriptions, and you pass the one you want to read. Â The only alternative is to exit, reload, and then try to stop on the right page. Â This script (below the fold) I put together will keep a copy in PDF form and open it in preview. Â The caching feature is nice because the conversion can be a bit slow at times (Note you’ll have to set your own location for the cached man pages) Update: hitting ‘u’ does a page up when reading man pages in terminal, but I still find the indexed searching and extra formatting nice in Preview.
Entries from October 2008 ↓
Easier to read man pages
October 28th, 2008 — Random Observation
They are trying
October 17th, 2008 — Random Observation
I really do believe Apple is trying to do the right thing
Bizarre post from Ringo
October 15th, 2008 — Random Observation
Been a fan of the Beatles most of my life, but this video post from Ringo is sad and strange.
Setting Default Apps, duti calls
October 8th, 2008 — Technology
I had always intended this blog to have some technical tips in the mix, but haven’t written up many, so here is one.
I manage an OS X environment at a school. We installed a new phone system that could email voicemail files as WAV files, and I wanted a way to set the default application that launches when these were double clicked from iTunes to Quicktime. Â This sort of thing is handled by launch services and can’t be manipulated by the defaults command. Â Andrew Mortensen (of the Radmind crew) to the rescue with a command line tool he wrote: duti.
This can be called a number of way, but I wanted to run it from a login script. Â It has to be run as the user whose settings you want to change, but loginscripts run as root, so one needs to call the actual binary as sudo.
Â
echo ‘com.apple.quicktimeplayer com.microsoft.waveform-audio all’ | sudo -u $1 /usr/local/bin/duti
ÂAnother great tip embedded in the man page for the utility is a way to get a list of all of the identifiers for launchservices:
Â
locate lsregister -dump | grep ‘[[:space:]]uti:’ | awk ‘{ print $2 }’ | sort | uniq