How to debug a .bash_profile

Posted by Blankman on Ask Ubuntu See other posts from Ask Ubuntu or by Blankman
Published on 2012-09-12T02:08:11Z Indexed on 2012/09/12 3:49 UTC
Read the original article Hit count: 1412

Filed under:
|

I was updating my .bash_profile, and unfortunetly I made a few updates and now I am getting:

env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
-bash: tar: command not found
-bash: grep: command not found
-bash: cat: command not found
-bash: find: command not found
-bash: dirname: command not found
-bash: /preexec.sh.lib: No such file or directory
-bash: preexec_install: command not found
-bash: sed: command not found
-bash: git: command not found

My bash_profile actually pulls in other .sh files (sources them) so I am not exactly sure which modification may have caused this.

Now if I even try and to a list of files, I get:

>ls
-bash: ls: command not found
-bash: sed: command not found
-bash: git: command not found

Any tips on how to trace the source of the error, and how to be able to use the terminal for basic things like listing files etc?

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about bash