lotus



previous page: 023.  I want to add '.' to root's PATH, to allow me to not have to put ./ in front of every local command I type. But I hear this is a bad thing. Why?
  
page up: Brief Linux FAQ
  
next page: 025.  Why can't I telnet or rsh in to my Linux system as Root?

024. I can't execute my script/program. I can list the file with ls -l and it is there with the correct permissions:




Description

This article is from the the Brief Linux FAQ (BLFAQ) Maintained by Neil Zanella nzanella@ganymede.cs.mun.ca

024. I can't execute my script/program. I can list the file with ls -l and it is there with the correct permissions:

ls -l mumble
-rwxrw-r--   1 me      user          104 Feb 14 15:46 mumble

but when I type mumble at the command prompt I get the response:

bash: mumble: command not found

Most probably the current directory (CWD) is not in your path. The best thing to do in such situations is probably to type the full path to the script/program followed by the name of the script/program . If you are work in a directory that you alone use and which is not shared then you might want to take the risk of editing your PATH variable to contain CWD. Alternatively you could keep all your executables in a directory called ~/bin and put it in your path. You can look at your path by typing echo $PATH at the shell prompt.

echo $PATH /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/me/bin

 

Continue to:















TOP
previous page: 023.  I want to add '.' to root's PATH, to allow me to not have to put ./ in front of every local command I type. But I hear this is a bad thing. Why?
  
page up: Brief Linux FAQ
  
next page: 025.  Why can't I telnet or rsh in to my Linux system as Root?