I would like to know if there is a way to determine where a specific part of my $PATH variable is being set.
About a year and and a half ago I went through the tedious process of setting up a Oracle XE 11.2.0 on my machine for a course I was taking. Somewhere in the process I added the path "/u01/app/oracle/product/11.2.0/xe/bin" to my $PATH variable to get things working. Well now I've deleted the root /u01/ folder that was exclusively used by the Oracle DB and so bash throws the error on startup that the file or directory doesn't exist. So I went manually looking through every possible file I can find listed and nothing.
As far as I can tell, that part of $PATH is not being set in any of these files:
/etc/login.defs
, ~/.profile
, /etc/environment
, /etc/profile
, ~/.bash_login
, ~/.bash_profile
or ~/.bashrc
.
That was verified first by running cat ~/.bashrc | grep "*oracle*"
on every file listed above. I even did the insane thing and ran sudo strings /dev/sdb -n 11 | grep -C100 "/u01/app/oracle/*"
to give me a list of every file that contained the string. I got lots of results, but nothing super valuable. My poor SSD didn't deserve that.
So any tips? How can I find out where that part of $PATH is being concatenated onto? Are there any other typical files that I should check? I'm running this on Linux Mint 18.3 if that narrows anything down.
grep
uses regular expressions, not wildcards.*oracle*
doesn't mean what you think it does in regex. Just dogrep oracle ~/.bashrc ~/.profile
(and whichever other files you want to grep). – muru Jul 23 '18 at 08:57grep oracle
on any of the above files listed stills pulls up nothing. – Aaron Chamberlain Jul 23 '18 at 09:17PS4=' $BASH_SOURCE:$LINENO: ' bash -lixc true |& grep oracle
. – muru Jul 23 '18 at 09:19/etc/bash.bashrc
– Aaron Chamberlain Jul 23 '18 at 09:23