[Ilugc] C Program Execute problem
- From: arun@xxxxxxxxxxxx (V.Arun (PPE))
- Date: Mon, 03 May 2004 10:45:53 +0530
On Sat, 2004-05-01 at 08:33, konjeti sreeram wrote:
i am sreeram .i compiled c program with GCC
compilation in Fedora linux.I complied Add.c program
gcc -o add add.c
It created add file.But when iam going to
execute it is not executing.It showing bash command
not found.I changed permissions also.when i copied
this add file to BIN directory It'd executing.after
deleting this file from bin directory it is not
executing.Please tell me how can i execute this
program without copying to bin directory.
thanks to every body
Unlike DOS, linux does not search the current directory to find the
program you are trying to run, unless the current directory is specified
in the PATH environment variable.
If you want to run a program placed in the current directory (like
'add'), you will have to run by typing './add'
The other option will be to add the current directory (.) in the PATH
variable. This makes the system less secure, hence generaly not used.
Other related posts: