Useful-and-overlooked Command Line Utilities du jour

by Erica Sadun

  • /usr/bin/say Speak the arguments out loud, e.g. % say hello world
  • /sbin/md5 Calculates a message digest checksum for a file, e.g. % md5 foo.gif
  • /usr/bin/cpan Grab and install CPAN module. e.g. % sudo -H cpan -i LWP::Protocol
  • /usr/bin/xmllint. Test XML file integrity, pretty print and more. e.g. % xmllint --format foo.xml

4 Comments

sjk
2006-03-17 21:41:39
This one was recently new to me:


% which tidy; man -k tidy
/usr/bin/tidy
tidy(1) - validate, correct, and pretty-print HTML files

Randal L. Schwartz
2006-03-18 23:20:22
I use "osascript" a lot to execute applescript from the commandline:
osascript -e 'tell application "Finder" to sleep'
That puts my mac to sleep... useful after a big compile or backup that I'm leaving my laptop to do when I go to sleep, so that my laptop sleeps when it's done.
Mike A
2006-03-19 04:10:29
You really ought to use


tell app "System Events" to sleep


since the Finder command for this is just a legacy one, and has been deprecated.

Mike A
2006-03-19 04:10:30
You really ought to use


tell app "System Events" to sleep


since the Finder command for this is just a legacy one, and has been deprecated.