Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Control the Finder with the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Control the Finder with the Terminal
Authored by: MacUser06 on Dec 13, '12 01:11:55PM

Open is a fairly advanced command, as a friend of mine put it, it is heavily modded.

It can amongst other things take a stream and open it in TextEdit, it can make the foreground window of an app come to front. It can open an app in the background, it can also open specific apps..

A read of its man page is recommended: "man open" in a Terminal window.

This brings the Finder window for CWD (current working directory) to front from the Terminal window:

open -b "com.apple.finder" .

Observe the dot at the end of the command!

Edited on Dec 13, '12 01:22:59PM by MacUser06


[ Reply to This | # ]
Control the Finder with the Terminal
Authored by: stib on Dec 14, '12 05:04:59AM
A very cool use ofopen is when you use the -n option to open an application. It opens a new instance of an application whether or not another one is already running. BTW don't follow the installation instructions on the github page if you have customised your ~/.bash_profile file, as it completely overwrites it, and none of the stuff in it is actually relevant.

[ Reply to This | # ]