Terminal keyboard shortcut for switching tabs

I love learning new keyboard shortcuts.  Here’s a nifty one for switching tabs in Terminal.

Press Command-Shift-Left or -Right arrows to cycle through your open Terminal tabs.

Give a shoutout if you find it useful!

Credit here


Screenshot of active window in Mac OS X

Today is a quick and short one.  Wondering how to take a screenshot of just a single application or window?  Yes, Apple makes it easy, just kinda hard to remember the exact key strokes 😉

Press Command-Shift-4 then Spacebar

Then move the mouse with the little camera icon over the application window that you want to take a screenshot of.  So useful!!

Credit goes to this about.com article.

Terminal Directories with Spaces or Special Characters

I’ve been trying to reduce the size of the Time Machine backup on my Time Capsule with a nifty trick that I’ll share in the next post.  In the process I learned something very useful in dealing with Terminal commands, in particular with directories.

The name of the directory I was trying to ‘cd’ into had spaces as seen below.  I used the “ls” command to show a list of drives in /Volumes.


If I simply type “cd /Andrew Cockerham’s Time Cap” it will give an error “no such file or directory”.  So to get into that directory, the easiest way is to wrap it in quotes:


You can ignore the fact that I’m in ‘root’ to do this method, you do not need to be in root for it to work.

The second way to do it is using backwards slashes, ‘\’, before each space in the directory name:


Note also that back slashes must be in front of the special characters, in this case the apostrophe.

Now this leads me to the next trick.  Typing out this long directory name with all the back slashes can be tedious, so a great shortcut is to simple start typing the first few letters of the directory, and then pressing the “Tab” key, and it will autocomplete the directory name for you, automatically adding the back slashes where need.


and autocomplete…


I love neat little keyboard shortcuts, especially in Terminal.

Hope you found it useful!