Hi,
When I learn shell script, I want to add my own PATH variable to system previous variables. I find that my linux has the below PATH variables (in the end of this message). It shows ‘No such file or directory’ although I verify that all the directories exist. Some directories are empty indeed. This will result that warning?
I want to make the present PATH variables correct before I add mine. Thanks
…
bash: /usr/lib/mpi/gcc/openmpi/bin:/home/jeff/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin: No such file or directory
As PATH is allready exported to the environment, there is not need to export it again (and again) when the value is changed. It does no harm of course, but it is one of those urban legends spread through the Linux world without increasing the real knowledge about what export is and does.
And to the OP. Your “last line” is a bit strange. When you want to post any computer output, please copy/paste that text please between CODE tags (Posting in Code Tags - A Guide) and please as complete as possible, thus we all can see what commands you used and what the results were. E.g., I would show the PATH variable as it was at a certain moment in this way:
henk@boven:~> export $PATH
bash: export: '/home/henk/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/home/henk/.local/bin': is geen geldige naam
henk@boven:~>
To my surprise, I have the same silly argument there!!!
This must be due to a bug somewhere in my .profile or* .bashrc*. I am going to investigate!
>I find that my linux has the below PATH variables
> (in the end of this message). It shows ‘No such file or directory’
> although I verify that all the directories exist. Some directories are
> empty indeed. This will result that warning?
>
> bash:
> /usr/lib/mpi/gcc/openmpi/bin:/home/jeff/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin:
> No such file or directory
remove the final : (behind bin) and that “No such file or directory”
should go away…i think with that bin: it is now looking for a file
or directory named " " (space) or "
" (end of line)
–
dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255
I think you missed something DD. We are still waiting for he OP to explain how he got that line with the error (it is not a warning imho).
You assume that he displays the contents of his environment variable PATH. But as he does not show how he got that line, I doubt that this is his PATH at all.
As you can see in my two posts, I am able to generate a line same as his by giving a command that DOES NOT display the PATH (in this case* export $PATH*, but I guess there are more possibilities). When I do* echo $PATH* the PATH is displayed and does not contain an error message.
That is the reason why I allways encourage to post not only the generated output of a command, but also the command itself. To avoid people assuming that the correct command was given where it was not.
On 05/16/2011 07:36 PM, hcvv wrote:
>
> I think you missed something DD. We are still waiting for he OP to
> explain how he got that line with the error (it is not a warning imho).
you are, as usual correct…
and the short answer to the OP is (i guess):
if you use the correct way to see your path, the “No such file…” error may go away…
try this (the correct) way to see your path: echo $PATH
–
dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255
Your efforts were not in vain; the answers you guys provided are still helping problem-debugging Google searchers (such as myself) years down the road.