Practical Terminal Commands Reference

I just found this amazing list of Terminal commands today:

The list is not customized for OS X systems, so not all of the commands or options necessarily work as listed. I was however able to find similar commands using the man pages. This list is really an amazing reference for commands to do practical things that you might not have known you could do.

I just discovered wget using this list. I think I might have used this a long time ago and then promptly forgot it existed. Basically it downloads files or websites for you. This was exactly what I happened to need to download all of the student websites for my Web Design class. I was able to download all of them in a matter of minutes. The only problem was that it didn’t seem to pick up CSS background images or fonts used from @font-face, so I had to manually check those. An indispensable nevertheless.

Discover which programs prevent disk image ejection

I stumbled across this great tip the other day about solving that pesky error message that happens when you try and eject a that is busy disk. This seems to happen all too often, I’ll try and eject one of my external hard drives and get the message even though there are no visible programs using it. Sigh. Use this commmand in Terminal:

lsof | grep DISKNAME

Read the full tip from Mac OS X Hints.

Take Screenshots From the Command Line

There is a command for Terminal in OS X which allows you to take screenshots from the command line. Creepy creepy. Here is the format:

screencapture -x FileToSaveAs

The -x option tells it not to make the shutter click sound. There is also an -i option which triggers an interactive mode, although I’m not sure why you would use the Terminal to do that.

There is also a cute little tidbit in the man page for screencapture:

Screencapture bug in man page