LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-23-2009, 10:18 AM   #1
puneetbrar
LQ Newbie
 
Registered: Nov 2007
Posts: 9

Rep: Reputation: 0
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
 
Old 05-23-2009, 10:21 AM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Thats some accident...
Whats in your path at the moment? What is the output of
Code:
/bin/echo $PATH
?

Last edited by jamescondron; 05-23-2009 at 10:22 AM. Reason: Correction, absolute command
 
Old 05-23-2009, 10:25 AM   #3
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189

Rep: Reputation: 105Reputation: 105
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.
 
Old 05-23-2009, 10:27 AM   #4
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS6
Posts: 267

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

Dave
 
Old 05-23-2009, 08:52 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
./configure command isn't working in command line jumpmansbro Linux - Newbie 20 01-22-2009 09:29 PM
at command not working raj_hcl1986@rediffma Linux - Newbie 7 12-06-2008 01:32 PM
mv command not working lqchangba AIX 9 07-23-2008 10:31 PM
su command not working dahmad Linux - Newbie 6 02-28-2003 01:08 AM
ps command not working slackerboy Slackware 2 08-23-2002 12:01 AM


All times are GMT -5. The time now is 04:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration