The open command on Mac OSX terminal

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

Posted by at August 10, 2010
Filed in category: Bash Tip & Tricks, Mac OS X, and tagged with: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <font color="" face="" size=""> <span style="">

Statistical data collected by Statpress SEOlution (blogcraft).