LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ls command not working (https://www.linuxquestions.org/questions/linux-newbie-8/ls-command-not-working-728003/)

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:

PATH=/home/user/bin:$PATH

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

PATH=$PATH:/home/user/bin

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
Code:

/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.

Dave

chrism01 05-23-2009 07:52 PM

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

/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/chris/bin


All times are GMT -5. The time now is 09:22 PM.