Re: [newbie] -C code=
You need to type ./ before the program name! You must read the following when ls -l your_bin_file, for example: -r-xr-xr-x1 userowner group 4024 Jan 12 09:55 your_bin_file the x flags at left indicate a executable file. If this is a binary file, already compiled and linked, to execute type from the directory where it's located: ./your_bin_file and type ENTER (RETURN), if you don use ./ the system try to find your the name you type as a binary file in $PATH. if chmod +x don't work properly, use: chmod 755 your_bin_file read the flags as: 7 - permissions for the owner to read, write and execute; 5 - permissions to the group to read and execute; 5 - permissions to all to read and execute. If I understand your prpblem, it will solve the problem! Jose On Sunday 14 January 2001 14:06, you wrote: i just downloaded a c program and it said to make it executable 'chmod +x file', and when im going to run it it just says that the file doesnt exist.. helP. Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1" Content-Transfer-Encoding: quoted-printable Content-Description:
RE: [newbie] -C code=
... If this is a binary file, already compiled and linked, to execute type from the directory where it's located: ./your_bin_file and type ENTER (RETURN), if you don use ./ the system try to find your the name you type as a binary file in $PATH. ... For anyone doing any kind of binary executable or script development this is indeed a good reason for adding "." to your $PATH variable. In most environments where I've worked with Unix, "." was usually the first directory in $PATH so that you could have your own utility or program supercede one that came with the system. If you don't want the latter to happen then put the "." on the end of $PATH. Cheers, Rick
Re: [newbie] -C code=
On Monday 15 January 2001 07:46, you wrote: For anyone doing any kind of binary executable or script development this is indeed a good reason for adding "." to your $PATH variable. In most environments This is very bad advice for security reasons. You should never put '.' in your path - or if you do, at least put it at the end. The reason is basically that if some hacker gets into your system, he can throw in replacements for various standard commands. And, if he hacks into your account, he can put it in your default directory - he might not be able to put it somewhere else because of permissions. If you're doing script development, make a private bin directory off of your $HOME, and put your stuff in there, and add $HOME/bin to the $PATH. Rick -- David E. Fox Thanks for letting me [EMAIL PROTECTED]change magnetic patterns [EMAIL PROTECTED] on your hard disk. ---
RE: [newbie] -C code=
Even better advice. Most of my experience was pre-heavy-hacking era (say 5 years ago) and was inside decent firewalls. I agree with your analysis and will take it to heart when I get Linux up on DSL here at home. Cheers and thanks, Rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David E. Fox Sent: Monday, January 15, 2001 11:42 AM To: [EMAIL PROTECTED] Subject: Re: [newbie] -C code= On Monday 15 January 2001 07:46, you wrote: For anyone doing any kind of binary executable or script development this is indeed a good reason for adding "." to your $PATH variable. In most environments This is very bad advice for security reasons. You should never put '.' in your path - or if you do, at least put it at the end. The reason is basically that if some hacker gets into your system, he can throw in replacements for various standard commands. And, if he hacks into your account, he can put it in your default directory - he might not be able to put it somewhere else because of permissions. If you're doing script development, make a private bin directory off of your $HOME, and put your stuff in there, and add $HOME/bin to the $PATH. Rick -- David E. Fox Thanks for letting me [EMAIL PROTECTED]change magnetic patterns [EMAIL PROTECTED] on your hard disk. ---
[newbie] -C code=
i just downloaded a c program and it said to make it executable 'chmod +x file', and when im going to run it it just says that the file doesnt exist.. helP.
Re: [newbie] -C code=
On Sun, 14 Jan 2001, lll wrote: i just downloaded a c program and it said to make it executable 'chmod +x file', and when im going to run it it just says that the file doesnt exist.. helP. What did you download? The c-source code? Making that +x won't help. You have to compile it first: gcc programname The result is "a.out". You can keep that or make that another name: mv a.out sensible_name Then chmod +x sensible_name After that you have to ./sensible_name (note the ./ at the start) to make things run. Good luck! Paul -- Press any key to continue. Any other key to abort. http://nlpagan.net - ICQ 147208 - Registered Linux User 174403 Linux Mandrake 7.2 - Pine 4.31
Re: [newbie] -C code=
lll wrote: i just downloaded a c program and it said to make it executable 'chmod +x file', and when im going to run it it just says that the file doesnt exist.. helP. are you using the format ./program_name or typing the full path of the program. If the directory that the program is in is not in your path you need to use one of the above methods. Don S
Re: [newbie] -C code=
Did you replace the word 'file' with the actual file name? If the file is 'myprogram.c', then you should 'chmod +x myprogram.c', and you need to be working in the same directory ('cd mydir', where 'mydir' is the directory where your *.c file exists) as the file is in, or include the path to the directory if not. Dave At 11:06 AM 1/14/01 -0500, you wrote: i just downloaded a c program and it said to make it executable 'chmod +x file', and when im going to run it it just says that the file doesnt exist.. helP. 0101 1010 0111 01101100 0110 01100111 01101001 01110011 01100100 01100101 0111 01100100 01001110 0110 01101110 01100111 01101100 01101001 01110110 01100101 01100100 01101001 01100111 01101001 01110100 0111 01101100 (Go figure it out.)