Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dave@UW

macrumors newbie
Original poster
Jun 3, 2004
9
0
Seattle
I'm assuming it's possible to use terminal to open files, for example, to play a song in iTunes by using a terminal command. Can anyone tell me how to do this, I've searched but with no success.

Thanks.
 
Dave@UW said:
I'm assuming it's possible to use terminal to open files, for example, to play a song in iTunes by using a terminal command. Can anyone tell me how to do this, I've searched but with no success.

Thanks.

CD into the directory. Use the "open" command. Read the man, if you want details on it.

Basically, use "open -a" to specify an application to open your file with.
 
You can use the open command for this. For example:

Code:
open ~/Music/Song.mp3

You can specify an application other than the default by using the -a flag, eg:

Code:
open -a iTunes ~/Music/Song.mp3
or
Code:
open -a /Applications/iTunes.app ~/Music/Song.mp3

Edit: Whoops, titaniumducky beat me to it by a minute.
 
abhishekit said:
open *drag your song here from the finder*

Now that is too cool. I had no idea.

Funny, I swear OSX has the best integrated command line of any OS I have ever used.

You just made may day :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.