Archive for March, 2009

Make the most of the Mac OS X’s command line

If you’re like most Mac users, the UNIX command line is the red-headed stepchild of the operating system. It’s always there, but you’re not going to acknowledge its existence — that is, until you need to run an SQL query, make an rsync backup, or generally muck about in the system internals.

Thankfully, TheAppleBlog’s Andrew Bednarz has assembled a compendium of Mac OS X terminal tips, tweaks, and tricks. He shows how to use Visor, a cool program that provides an always-accessible pulldown terminal prompt just like the console in the video game Quake. He also shares some insider UNIX knowledge on tweaking Terminal.app to display color-coded directory listings and more informative command prompts.

Go check out his list of tips. Your command line will thank you.

Having trouble finding text with grep? Try grepping with color

Having trouble finding a needle in a haystack? You can always use grep --color to find what you are looking for. This method is best used for finding a specific piece of text in a document that is all on one line, or a unique string of text within a repetitious document. I have provided the syntax for this grep option below:

grep --color "text" filename

Example: