Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-04-2005, 02:02 PM   #1
Member (5 bit)
 
Join Date: May 2004
Location: Connecticut
Posts: 19
how to execute a.out?

i used "gcc filename.c" to compile my program and it created a file named a.out i am geusing that's the file i need to run in order to run my program...but heres the thing i dont know the linux command to run it...any one have any ideas?
SupraMan84 is offline   Reply With Quote
Old 02-04-2005, 04:21 PM   #2
usual suspect
 
hobey19's Avatar
 
Join Date: Jun 2002
Location: not here
Posts: 2,051
just navigate to the folder where the file is and type a.out, it will run itself

craig
__________________
the universe is against this current wave of success i'm having. -johnny drama, entourage
hobey19 is offline   Reply With Quote
Old 02-04-2005, 11:35 PM   #3
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,285
Also, if you want to save it, you will have to rename it, otherwise it will be overwritten the next time you compile something.
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 02-05-2005, 02:19 PM   #4
Member (5 bit)
 
Join Date: May 2004
Location: Connecticut
Posts: 19
i just typed a.out in the console in the folder where a.out is located and is said "a.out command not found"...?
SupraMan84 is offline   Reply With Quote
Old 02-05-2005, 02:30 PM   #5
usual suspect
 
hobey19's Avatar
 
Join Date: Jun 2002
Location: not here
Posts: 2,051
is the command you used above exactly what you used. could you have put a filename after that to output it to? i haven't done compiling in awhile, so i don't remember all the commands, but i know that you could just have it go to a file rather than a.out

craig
hobey19 is offline   Reply With Quote
Old 02-05-2005, 03:01 PM   #6
Member (5 bit)
 
Join Date: May 2004
Location: Connecticut
Posts: 19
no that's exactly as i put in the command...ive done it before and its worked...i think it might be because im connecting to a linux machine remotely using ssh...awell...thanks for the help though
SupraMan84 is offline   Reply With Quote
Old 02-05-2005, 03:06 PM   #7
usual suspect
 
hobey19's Avatar
 
Join Date: Jun 2002
Location: not here
Posts: 2,051
just for giggle sake, i telneted back into my old unix system at another university and it compiled and ran just fine, so i know that the sequence you are using is prolly right, then. could just be something on their end maybe

craig
hobey19 is offline   Reply With Quote
Old 02-14-2005, 02:26 PM   #8
Member (8 bit)
 
MichaelS's Avatar
 
Join Date: May 2003
Location: Richmond Hill, Ontario, Canada
Posts: 128
Send a message via ICQ to MichaelS Send a message via MSN to MichaelS Send a message via Yahoo to MichaelS
cd to the directory with the file then chmod u+rx a.out then to run it: ./a.out
MichaelS is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:54 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0