问题
Every time I open a new Terminal window I see the following.
-bash: /Users/tim/.profile: No such file or directory
I have no idea why this is happening or where to look to fix it; my profile is located at /Users/tim/.bash_profile not /Users/tim/.profile
Any thoughts on how to troubleshoot this?
回答1:
This happened to me as well and I noticed that at the top of my .bash_profile it had:
source ~/.profile
My understanding is that on MacOS / OS X .bash_profile is given priority over .profile so the latter file isn't required.
To fix therefore I simply removed source ~/.profile from the top of the file.
Hope that helps.
Edit: original poster commented that he just created a blank .profile to solve this as well.
回答2:
I met the same issue today, i guess it's because i use the cleaning app and the app considered this file was a waste of space so deleted it. touch ~/.profile helps me.
来源:https://stackoverflow.com/questions/40157445/mac-terminal-error-bash-users-tim-profile-no-such-file-or-directory