 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

12th October 2008, 06:57 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
$PATH error
If I do the $PATH I always get No such file or directory I can't use the set path command so how do I find the system path as it is set to change or at least see what is giving the error.
I checked all directories that show and they are all good so it is giving the error and not showing the directory it is looking for.
|

12th October 2008, 07:37 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: halleatbe
Posts: 360

|
|
|
__________________
Best regards,
phe,
===================================
Remember : Knowledge is power.
===================================
|

12th October 2008, 10:56 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
|
$PATH error
doing a set|more command I found the path statement and doing an export PATH= statement I am able to set the path but all of the directories are good and I still get the same error at the end.
This happens to all users including root so it has to be a system wide error.
Last edited by aukermanw; 12th October 2008 at 11:00 PM.
|

13th October 2008, 01:53 AM
|
|
Registered User
|
|
Join Date: Jul 2006
Posts: 293

|
|
|
execute the command echo $PATH and past the result here, and what exactly you are tring to do - $PATH on its own is not a command, its a variable.
|

13th October 2008, 03:25 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
|
$PATH error
It is indeed a variable but it also acts as a command. If you type $PATH by itself it gives you the value, you do not have to echo.
I am going to close this thread myself as I have seen other machines that do the same so I will consider it a feature.
Thank you for your help
|

13th October 2008, 04:07 PM
|
 |
Retired User
|
|
Join Date: Oct 2004
Location: London, UK
Posts: 4,999

|
|
|
It is not a command it is a variable.
linux likes to give an error when you enter a non-command to let you know that you have typed something silly.
|

13th October 2008, 04:17 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,119

|
|
Code:
~/> $PATH
bash: /usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/paulm/bin: No such file or directory
Yeah, I didn't know you could just type the variable to have it list it's value. But note 'No such file or directory' displayed at the end of the path list. That's because /home/paulm/bin doesn't exist. Perhaps that is what you're seeing? Using 'echo $PATH' won't report any such error, just the contents of the variable.
|

13th October 2008, 04:59 PM
|
 |
Retired User
|
|
Join Date: Oct 2004
Location: London, UK
Posts: 4,999

|
|
Quote:
Originally Posted by PabloTwo
Code:
~/> $PATH
bash: /usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/paulm/bin: No such file or directory
Yeah, I didn't know you could just type the variable to have it list it's value. But note 'No such file or directory' displayed at the end of the path list. That's because /home/paulm/bin doesn't exist. Perhaps that is what you're seeing? Using 'echo $PATH' won't report any such error, just the contents of the variable.
|
The error is generated because the value of the variable $PATH is a colon separated list of dirs, which is not a command nor a recognisable file or dir. It is not telling you that one of the dirs in $PATH does not exist.
In case of confusion
Code:
export PATH2=/home:/usr
$PATH2
-bash: /home:/usr: No such file or directory
export PATH3=/home
$PATH3
-bash: /home: is a directory
|

13th October 2008, 06:06 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,119

|
|
|
Yes, I know "$PATH" is not a bash command. My point was that when confronted with just "$PATH", bash listed the entire contents of the PATH variable in the error line instead of just "bash: $PATH unknown command" or "bash: $PATH unknown file or directory".
I removed /home/paulm/bin and /usr/X11R6/bin from my $PATH, leaving only valid paths, and got the same results, so you're absolutely correct that bash is telling me that "$PATH" is an unknown file or directory and not related to a non existent path in the PATH statement. I just thought it interesting that bash parsed the variable and displayed it's contents.
Last edited by PabloTwo; 13th October 2008 at 06:16 PM.
|

13th October 2008, 10:24 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 4

|
|
|
$PATH error
See I said it was a feature, just trying to say "DON'T DO THAT"
Thanks to everyone
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 03:02 (Monday, 20-05-2013)
|
|
 |
 |
 |
 |
|
|