Opening Finder in Current Folder from Terminal and Vice Versa

For opening the Finder in the current working directory that you’re in the Terminal with use the command:
open .

The open command is very powerful, here are some other options for the command:

Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-W, --wait-apps Blocks until the used applications are closed (even if they were already
running).
-n, –new Open a new instance of the application even if one is already running.
-g, –background Does not bring the application to the foreground.
-h, –header Searches header file locations for headers matching the given filenames,
and opens them.

For opening the Terminal in the current working directory of the Finder download this script. Put it in some static folder, I myself have it in ~/Library/Scripts. Once the script is in your folder drag the app into the Finder’s menu-bar. Here are the options for opening the terminal.

  • Clicking the application icon creates a new Terminal at the Finder’s location (i.e. the old behavior)
  • ⌘ + Clicking opens a new tab in the frontmost Terminal instead of opening a new window
  • ⌥ + Clicking runs the cd command in the frontmost Terminal window if it is not busy. Otherwise it opens a new window/tab (depending on the state of ⌘)

Maururu

open_in_terminal/fidner


 
 

Post a comment to "Opening Finder in Current Folder from Terminal and Vice Versa"



Support MacTips

MacTips Newsletter


Random Popular Tips

Recent Comments

Recent Discussions

MacTips Poll

What level of tips would you like to see?

View Results

Loading ... Loading ...

Friends of MacTips

Subscribe to MacTips

Site Links