Home > Bash Tip & Tricks, Mac OS X > The open command on Mac OSX terminal

The open command on Mac OSX terminal

August 10th, 2010 Leave a comment Go to comments

On your Mac OS X terminal you can use the open command like a double click.

For example you can issue the following command:

# open .

this command will open the working directory in the finder.

now imagine you want to open all the .doc document in the working directory, you can issue the following command:

# open *.doc

adding some switches you can do more. Now imagine you want to open all the .doc document in the working directory with openoffice, you only need to add the "-a" switch:

# open -a swriter *.doc

with the "-e" switch Mac OS X will open your files with TextEdit

with the "-g" the Terminal will remain in foreground.

See the man page for further information.

Gg1

  1. No comments yet.
  1. No trackbacks yet.
*

Statistical data collected by Statpress SEOlution (blogcraft).