Unexpected directory in path, cannot find source
Hello all,
I have a problem with a directory in my PATH that should not be there. I have checked /etc/bashrc, /etc/profile, ~/.bashrc, ~/.bash_profile, and the two files that get sourced in by ~/.bashrc and cannot find the unwanted directory anywhere. Based on the order the directories are listed in my PATH, I think it is being inserted after /etc/bashrc and /etc/profile are called, but before ~/.bashrc and ~/.bash_profile are called. However, I cannot figure out how. Any ideas? I realize I am probably missing something obvious, but at the moment I'm just spinning my wheels -- time to ask for help! Oh, and in case it makes a difference: 64-bit RHEL 4.7 with bash shell (obviously). Thanks, Alan |
I don't know what is happening since I don't have access to your profile files, but anyway if you want a quick and dirty solution, just add that command in your ~/.bashrc:
export PATH=$(echo $PATH|sed 's/:badpath://g') |
Quote:
Culprit can be here |
Quote:
I stopped sourcing the external files in my ~/.bashrc and now my PATH looks as it should. I still don't know where a couple of the entries (the ones that were duplicated before) are coming from. Quote:
Code:
# /etc/profile Code:
# .bash_profile Code:
# /etc/bashrc Code:
# .bashrc Thanks for the advice, Alan |
All times are GMT -5. The time now is 07:28 PM. |