DTerm: Useful Omnipresent Command Line for OS X

Found this sweet free utility called DTerm recently. It enables you to pull a context-aware pop-up that you can use to run command line utilities from whatever program you're currently using. What do I mean by "context-aware"? DTerm will automatically change directories to the one your program is currently in. Moreover, for those of us using multiple spaces, any programs you run from DTerm will open their windows in your current space.

Here's an example. Say I want to package up a bunch of images. Simple: hit Shift-Cmd-Return to invoke DTerm, its window overlay on the Finder's, and I can then run a "tar" command. That's it. I could even stay in DTerm and copy pics.tgz to a different drive, or scp it to another server.

This is a very useful tool. Here are a few other things you can do with it:
  • Quick calendar: "cal" will display this month's calendar, hit Shift-Cmd-C and you'll have it in your clipboard (cal 2010 will give you this year's calendar)
  • Starting TextMate: Typing "mate ." from a Finder window will open TextMate in project mode in the current directory
  • Comparing files: Select 2 files in the Finder, run DTerm, type "cmp" or "diff" then Shift-Cmd-V to paste the names of the files you selected into DTerm
  • MD5 checksum: Select the files you want to sum and run "md5" + Shif-Cmd-V
  • Info on all files in the current directory, including hidden ones: "ls -al"
  • Create a series of folders in the current directory: much faster to type "mkdir foo bar foo/bar" than to use the Finder
  • Quick lookup info on a domain: "dig google.com"
  • Want your mac to read you something? Select some text, copy it, invoke DTerm and type "say" followed by pasting the text surrounded by quotes
  • Byte, word, line counts: "wc" and the file(s) you're interested in

Not all these examples require DTerm's features but having a terminal window at your fingertips, without needing to switch context, is very useful.

And it's another reason to make better use of all those command line utilities!

Hat tip to @azaaza for the pointer.