I ran a source command on a file that was missing. I forgot about it but later noticed that every time I opened a new terminal, the first line would be a warning about the missing file

bash: /software/intel-composer-2011u5-x86_64/bin/compilervars.sh: No such file or directory
~ $

How do I get rid of this warning?

  • 4
    Look at your ~/.bashrc (if you use bash) or ~/.bash_profile or ~/.profile and look for some reference for that file. – Risto Salminen Dec 11 '13 at 5:42

As a general rule, strange errors like that are due to a file being called from one of the various initialization files your shell reads. Which one, will depend on the shell you are using and how you are launching it.

Here's a nifty function that will look through all possible bash init files and grep them for whatever you are looking for. Add these lines to your ~/.bashrc:

  for f in  ~/.bashrc ~/.profile ~/.bash_profile ~/.bash_login \
        /etc/profile /etc/bash.bashrc /etc/environment; 
    [ -e $f ] && grep -H HIST $f; 

You can now check which file you are calling the missing file from:

$ grep_bash intel-composer-2011u5-x86_64 
/home/terdon/.bashrc:source /software/intel-composer-2011u5-x86_64/bin/compilervars.sh
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.