A command has been added to the $PATH, but I cannot find the place that the path has been added to $PATH. Please see that which shows the full path to the binary file, however looking into .bashrc, .bash_profile, /etc/profile and /etc/profile.d returns no result. Please note that the matches in the grep relates to something else.How can I find where does this path had been added to $PATH?# which mpicc/opt/openmpi/bin/mpicc# grep -r openmpi .bash_profile# grep -r openmpi .bashrcalias of230='module load openmpi-x86_64; source /export/apps/mechanics/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI'# grep -r openmpi /etc/profilealias of230='module load openmpi-x86_64; source /export/apps/mechanics/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=4 foamCompiler=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=SYSTEMOPENMPI'# grep -r openmpi /etc/profile.d//etc/profile.d/rocks-hpc.csh:# Add default module definition for rocks-openmpi./etc/profile.d/rocks-hpc.csh:# Load the rocks-openmpi module if ROCKS_USER_MODULE_DEF not defined/etc/profile.d/rocks-hpc.csh:   module -s add rocks-openmpi/etc/profile.d/rocks-hpc.sh:# load the defaults rocks-openmpi module/etc/profile.d/rocks-hpc.sh:# Add default module definition for rocks-openmpi./etc/profile.d/rocks-hpc.sh:    module add rocks-openmpi 2>/dev/nullPlease also see the $PATH# echo $PATH/opt/openmpi/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/hmmer/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/usr/java/latest/bin:/opt/maven/bin:/opt/maui/bin:/opt/torque/bin:/opt/torque/sbin:/opt/pdsh/bin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/linux-x64:/export/apps/mathematics/matlab2012a/bin:/opt/maui/bin:/export/apps/mathematics/matlab2012a/bin:/export/apps/mathematics/Mathematica/10.3/Executables:/usr/local/chem/g09-64-D01:/home/mahmood/bin:/opt/maui/bin:/opt/torque/bin:/opt/torque/sbin
Finding the file that contains the added path to $PATH
centos;environment variables;path