How to recover .profile on Mac OS?

I have mis-configured ~/.profile while adding new environment variable. I want to restore my original .profile for my Mac OS, I am not mac expert please help me. None of my shell command is working for me like ls, java, php etc Please help


Solution 1:

Show hidden files in Finder. Then you can either fix the problem in TextEdit, or simply remove/rename the file. There is no default ~/.profile on Mac OS X, only a global /etc/profile (and you may also have a ~/.bash_profile).