BrentN
Mar 06, 2005, 08:47 AM
Many people are aware of the 'open' program, a command-line tool for opening files and folders in their default applications from the command line.
Often, we want to open a folder from the command line. Just using 'open' to do so opens a Finder window. The way around this is to use 'open -a', which lets you specify the application you want to have open the file.
Since its pretty cumbersome to always type 'open -a /Applications/Path\ Finder.app', you should create an alias to do this for you.
If you use bash, which is the default shell on OS X 10.3, this is what you need to do. First, open ~/.bashrc - this is the resource file that contains all the customizations for the bash shell. If you haven't done anything to your defaults, this file may not exist. If it doesn't, create the file.
Add the following line to your .bashrc:
alias pf='open -a "/Applications/Path Finder.app"'
Save the file and open a new shell. Now, when you type 'pf .' on the command line, the current directory will open in a PF window. This also works for files that PF understands, such as rtfd files.
Often, we want to open a folder from the command line. Just using 'open' to do so opens a Finder window. The way around this is to use 'open -a', which lets you specify the application you want to have open the file.
Since its pretty cumbersome to always type 'open -a /Applications/Path\ Finder.app', you should create an alias to do this for you.
If you use bash, which is the default shell on OS X 10.3, this is what you need to do. First, open ~/.bashrc - this is the resource file that contains all the customizations for the bash shell. If you haven't done anything to your defaults, this file may not exist. If it doesn't, create the file.
Add the following line to your .bashrc:
alias pf='open -a "/Applications/Path Finder.app"'
Save the file and open a new shell. Now, when you type 'pf .' on the command line, the current directory will open in a PF window. This also works for files that PF understands, such as rtfd files.