Open Your Current Terminal Directory In Finder 4
Terminal
Hey
I found a rather cool little tip that I thought I would post. Its in regards to opening the current folder you are browsing in while using Terminal. Many times I have wondered if there was a way to view my current folder, this is usually very useful if you are very deep within a directory and need to have a more visual look at it with Finder. I’ve also found that its useful when viewing the output of any bash scripts.
To open the folder you are viewing in Terminal type the following:
open .
The word “open” is followed with a dot, without it it doesn’t work.
You can combine the open command with the change directory command. This is useful if you want to do something in Terminal and view the Finder window belonging to it.
cd /path/to/folder; open .
You can write it as one line and is a quick way to move around Terminal and Finder in one.
Within a couple of days i’ll have another post on using the open command. It is very useful.
Where To Next?
4 Responses to “Open Your Current Terminal Directory In Finder”
-
1
thanks for the open command… but why do you change the directory first to open the current directory afterwards (the dot)? just open /path/to/folder
Comment By knrr on August 19th, at 9:47 pm
-
2
I’d like to do the opposite: open a terminal already cd’ed to the directory i’m browsing in Finder :)
Comment By Luca on August 31st, at 6:37 pm
-
3
In Terminal type cd, then drag and drop your folder into Terminal.
Comment By admin on August 31st, at 6:42 pm
-
4
I have a simple copy shell script that I saved as an executable:
==============
#!/bin/bashcp ../AAA/BBB.jpg .
==============When I double click it to run the script, it thinks I am at home directory. So it’s giving me an error
“cp: ../AAA/BBB.jpg: No such file or directoryHow do I need to do to tell it to use the current directory I am in?
Thanks!
Comment By Eric on October 21st, at 7:50 pm