I’ve discovered the joys of the OS X command line. I’ve been introduced to the goodies in the bin and sbin. I’ve also found and installed some cool new commands to add to the goodness. While I was scouring my bin, I noticed a command called “bbedit”. It allows me to open up any file with BBEdit instead of pico or vi. Yeah!
I also downloaded and installed a replacement for the standard “rm” Unix command. rm simply deletes the file/directory without any second-chances. The O’Reilly Network has posted an article showing how to alias a new rm function that is Trash-aware. So instead of immediately deleting the chosen file/directory, it moves it to the Trash can in the dock. Very nice. I varied from the O’Reilly article a bit in that I renamed the new command “srm” for smart-rm. This way the original rm still works.
I also downloaded a new function called ”launch”. It is a more flexible version of the “open” command. Some of the features:
• opens URLs and email addresses in your preferred helper application, or sends URLs to any other application of your choice
• lets you specify applications by their four-character creator (e.g. ‘ToyS’) or Java-style bundle ID (e.g. com.apple.scripteditor), both of which allow you to move or rename an application without changing references to it
• asks applications to print documents, something the OS X Finder doesn’t let you do any more
• pipes output to applications
• launches applications in the background
• launches Carbon applications in Classic
• reports errors intelligibly
• shows information about any item on disk, including its file type, creator, data and resource fork sizes, version, dates and bundle ID (where applicable).
It’s a handy little function to have. I simply moved the file into a bin directory I made in my Home directory and aliased it. It works like a charm too.
I’ve also stopped using Apple’s Terminal application and use iTerm instead. It allows for several sessions in one window with a tabbed interface, kind of like Linux’s terminal.