Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'related tips' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
related tips
Authored by: robh on Apr 03, '01 08:33:16AM

As 'Ciannait' pointed out, running it with "./a.out" ought to do the trick.

Note that if you're thinking of putting "./" into your default path, DON'T. It's considered a security weakness to be able to run executables in the current directory without explicitly identifying them with the directory path or "./".

If you move the executable into ~/bin (aka /Users/Myname/bin) you might be surprised to find that the shell (tcsh) can't find it even though ~/bin is in your path (printenv PATH). The problem here is that the contents of the directories in your path were cached when the shell started, so you need to run "rehash" first to refresh the cache.

If you are creating your own command line executables then it's a good idea to keep them in ~/bin so that you can run them from any directory without giving the full path.

[ Reply to This | # ]