LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 09: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, 09:21 AM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
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 09:22 AM. Reason: Correction, absolute command
 
Old 05-23-2009, 09:25 AM   #3
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

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, 09:27 AM   #4
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

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

Dave
 
Old 05-23-2009, 07:52 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

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



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 08:29 PM
at command not working raj_hcl1986@rediffma Linux - Newbie 7 12-06-2008 12:32 PM
mv command not working lqchangba AIX 9 07-23-2008 09:31 PM
su command not working dahmad Linux - Newbie 6 02-28-2003 12:08 AM
ps command not working slackerboy Slackware 2 08-22-2002 11:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:32 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
Open Source Consulting | Domain Registration