-   Linux - Newbie (
-   -   ls command not working (

puneetbrar 05-23-2009 09:18 AM

ls command not working
Hi there

i am using cent os 5.2 on a hosting having plesk as i have ssh access i was working with the apache ant and my java path was not getting setup

so i accidentally did this

PATH=$(echo $PATH | sed -e 's;:\?/home/user/bin;;' -e 's;/home/user/bin:\?;;')

If you need, you can re-add it at the front of the list with:


Or you can re-add it at the end of the list with:


after that my ls command is not working and nothing is working
no command is working

can anybody help

how can i fix the whole thing

jamescondron 05-23-2009 09:21 AM

Thats some accident...
Whats in your path at the moment? What is the output of

/bin/echo $PATH

choogendyk 05-23-2009 09:25 AM

try `/bin/echo $PATH`

seems pretty obvious that you borked your $PATH so that it doesn't include the basic bin directories where your system's commands are. Put them back in $PATH.

if you can't figure that out, break your connection, log in again, and don't do that again.

david1941 05-23-2009 09:27 AM

If you exit the ssh and ssh back in, the $PATH should be reset to whatever the login uses.


chrism01 05-23-2009 07:52 PM

This might help. On my Centos 5.3 my default PATH is


All times are GMT -5. The time now is 07:18 AM.