Sridhar J (june end) wrote:
> Hello
> 
> When I compile a C program using gcc, I get an a.out file. But when I type
> a.out, the error is "No such command"
> 
> How do I execute the file?

When you type "a.out", Linux checks the various "path" directories (e.g. 
"/usr/bin") for a file named "a.out".  If it can't find it, then it 
tells you that, well, it can't find it - that the command doesn't exist :o).

You can get around this by typing the exact path of the program.  Say 
a.out is located in "/home/sridhar/".  You can type "~/a.out" (from 
anywhere), or change to your home directory and type "./a.out".



-- 
Mark Gallagher
http://cyberfuddle.com/infinitebabble/




-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to