New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

OS 10.5 - Launching apps from terminal (like linux?)


Post Reply New Thread Subscribe

 
Thread Tools
systix

 
Member Since: Dec 09, 2008
Posts: 19
systix is on a distinguished road

systix is offline
One of the things I miss in OS X compared to linux (ubuntu) is the ability to easily launch applications from the terminal, with or with out parameters to open files in that application.

Eg if i wanted to edit a document on linux I would type
Code:
gedit ~/files/example.txt
In OS X I dont seem to be able to do this, is there a way?
I know I can add an alias entry for each program to just run it like below:
Code:
alias tx 'open /Applications/TextEdit.app/'
but what happens if i want to open a file with this application as I know the command is different (using the -a option).

Is there any way to get OS X to work like linux in this way?

thanks.
QUOTE Thanks
MacsWork

 
MacsWork's Avatar
 
Member Since: May 22, 2005
Location: Closer than you think.
Posts: 2,145
MacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really nice
Mac Specs: Performa 6116 2GBSCSI 8MB OS 7.5.3

MacsWork is offline
open /Applications/TextEdit.app ~/File.txt

Assuming there is File.txt in the root of your home directory
QUOTE Thanks
technologist

 
Member Since: Mar 30, 2004
Location: USA
Posts: 4,744
technologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond reputetechnologist has a reputation beyond repute
Mac Specs: 12" Apple PowerBook G4 (1.5GHz)

technologist is offline
Quote:
Originally Posted by MacsWork View Post
open /Applications/TextEdit.app ~/File.txt
or just

Code:
open ~/File.txt
(to open it with whatever the default application is for that file)
QUOTE Thanks

Post Reply New Thread Subscribe


« Damaged Install disc? | Phone Sync Issue »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Linux crazychristian Running Windows (or anything else) on your Mac 3 08-25-2008 07:55 PM
Linux Dual boot on 1.25 Ghz G4 Emac 1gb RAM TxNoob Running Windows (or anything else) on your Mac 1 06-22-2008 01:22 AM
What is your opinion on the future of Linux and the Mac? RickR Schweb's Lounge 17 05-09-2008 05:47 AM
Looking to try out Linux on my Dell CharlesP2001 Running Windows (or anything else) on your Mac 9 03-13-2006 09:28 AM
The mysterious Terminal Kokopelli OS X - Operating System 2 03-05-2006 08:23 AM

All times are GMT -4. The time now is 12:12 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?