Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th October 2008, 06:57 PM
aukermanw Offline
Registered User
 
Join Date: Oct 2008
Posts: 4
Angry $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.
Reply With Quote
  #2  
Old 12th October 2008, 07:37 PM
phe Offline
Registered User
 
Join Date: Nov 2006
Location: halleatbe
Posts: 360
See :

http://forums.fedoraforum.org/showthread.php?t=184971
__________________
Best regards,

phe,

===================================
Remember : Knowledge is power.
===================================
Reply With Quote
  #3  
Old 12th October 2008, 10:56 PM
aukermanw Offline
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.
Reply With Quote
  #4  
Old 13th October 2008, 01:53 AM
wintersm Offline
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.
Reply With Quote
  #5  
Old 13th October 2008, 03:25 PM
aukermanw Offline
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
Reply With Quote
  #6  
Old 13th October 2008, 04:07 PM
sideways's Avatar
sideways Offline
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.
Reply With Quote
  #7  
Old 13th October 2008, 04:17 PM
PabloTwo's Avatar
PabloTwo Online
"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.
Reply With Quote
  #8  
Old 13th October 2008, 04:59 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
Quote:
Originally Posted by PabloTwo View Post
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
Reply With Quote
  #9  
Old 13th October 2008, 06:06 PM
PabloTwo's Avatar
PabloTwo Online
"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.
Reply With Quote
  #10  
Old 13th October 2008, 10:24 PM
aukermanw Offline
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
Reply With Quote
Reply

Tags
$path, path error

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add path /usr/local/bin/lftp to user path nix4me Using Fedora 6 18th August 2010 12:31 AM
Error building the kernel: Probable Malformed path balpeck Using Fedora 0 22nd July 2007 06:30 AM
Another anoying newbie Echo $path error TheTallest Using Fedora 5 1st August 2006 07:14 PM
$PATH giving error rajeev_nni Installation and Live Media 1 20th January 2005 12:36 PM


Current GMT-time: 03:02 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat