Friday, May 25, 2012

Open a File Browser From Your Current Command Prompt/Terminal Directory

Ever been doing some work at the command line when you realized… it would be a lot easier if I could just use the mouse for this task? One command later, you’ll have a window open to the same place that you’re at.
This same tip works in more than one operating system, so we’ll detail how to do it in every way we know how.
Open a File Browser in Windows
We’ve actually covered this before when we told you how to open an Explorer window from the command prompt’s current directory, but we’ll briefly review: Just type the follow command into your command prompt:
explorer .
image
Note: You could actually just type “start .” instead.
And you’ll then see a file browsing window set to the same directory you were previous at. And yes, this screenshot is from Vista, but it works the same in every version of Windows.

If that wasn’t good enough, you should really read how you can navigate in the File Open/Save dialogs with just the keyboard—now that’s a Stupid Geek Trick!
Open a File Browser in Linux
For this exercise, we’re going to assume that you’re using Gnome under a Linux flavor like Ubuntu, because that’s the most common. From your terminal window, just type in the following command:
nautilus .

And the next thing you know, you’ll have a file browser window open at the current location. You’ll see some type of error message at the prompt, but you can pretty much ignore that.

You can also use “gnome-open .” if you want.
Open Finder in Mac OS X
All the Mac computers in this office are running Linux, so we haven’t had a chance to verify, but you should be able to use the following command on OS X to open Finder in the current terminal location:
open .
Open Dolphin on Linux KDE4
dolphin .
Got any extra tips to help out your fellow readers? How do you do the same thing in KDE3? What about OS X? Leave your savvy advice in the comments, and maybe we’ll update the article. Or not. Either way, it’ll help somebody!

No comments:

Post a Comment