From: Ric on
On 12 July, 21:29, Richard Kettlewell <r...(a)greenend.org.uk> wrote:
> Ric <infobub...(a)gmail.com> writes:
> > On 12 July, 20:41, use...(a)alienrat.co.uk (Woody) wrote:
> >> Ric <infobub...(a)gmail.com> wrote:
> >> > Attempting to get Android SDK running and I think I've borked my bash
> >> > profile.  Now, from a terminal window, most commands just give
> >> > "command not found".  CD to a directory works, for example, but LS to
> >> > list contents does not.  pico doesn't work.  I'm not sure what I've
> >> > done and I've even less idea how to put it back to normal.
> >> > Anyone able to help me out?
>
> >> If you type 'set' in the terminal what is your path?
>
> >> Mine is
> >> PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/wo
> >> ody/Projects/android-sdk-mac_x86-1.5_r1/tools
>
> >> hmm.. should change that last bit now that I don't have that folder!
>
> >> --
> >> Woody
>
> >>www.alienrat.com
>
> > Guys, ran PATH=/usr/bin:/usr/sbin:$PATH  in terminal, and it executes,
> > but when I then try an "ls" command it's still not found.
> > After this, running "set" gives
>
> You need both /bin and /usr/bin.
>
> --http://www.greenend.org.uk/rjk/

Any chance of an idiot's guide? I apologise in advance: I am that
idiot.

From: Ric on
On 12 July, 21:46, Ric <infobub...(a)gmail.com> wrote:
> On 12 July, 21:29, Richard Kettlewell <r...(a)greenend.org.uk> wrote:
>
>
>
>
>
> > Ric <infobub...(a)gmail.com> writes:
> > > On 12 July, 20:41, use...(a)alienrat.co.uk (Woody) wrote:
> > >> Ric <infobub...(a)gmail.com> wrote:
> > >> > Attempting to get Android SDK running and I think I've borked my bash
> > >> > profile.  Now, from a terminal window, most commands just give
> > >> > "command not found".  CD to a directory works, for example, but LS to
> > >> > list contents does not.  pico doesn't work.  I'm not sure what I've
> > >> > done and I've even less idea how to put it back to normal.
> > >> > Anyone able to help me out?
>
> > >> If you type 'set' in the terminal what is your path?
>
> > >> Mine is
> > >> PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/wo
> > >> ody/Projects/android-sdk-mac_x86-1.5_r1/tools
>
> > >> hmm.. should change that last bit now that I don't have that folder!
>
> > >> --
> > >> Woody
>
> > >>www.alienrat.com
>
> > > Guys, ran PATH=/usr/bin:/usr/sbin:$PATH  in terminal, and it executes,
> > > but when I then try an "ls" command it's still not found.
> > > After this, running "set" gives
>
> > You need both /bin and /usr/bin.
>
> > --http://www.greenend.org.uk/rjk/
>
> Any chance of an idiot's guide?  I apologise in advance: I am that
> idiot.

Ahaha! ignore last post: just added those to the PATH command and
we're up and running: however when I restart terminal it forgets the
setting. Where is the file that the SET command lists? Presumably I
need to edit this in Pico and add the full path string to the end?
From: Richard Kettlewell on
Ric <infobubble(a)gmail.com> writes:
> Ahaha! ignore last post: just added those to the PATH command and
> we're up and running: however when I restart terminal it forgets the
> setting. Where is the file that the SET command lists? Presumably I
> need to edit this in Pico and add the full path string to the end?

Generally one (or more) of .profile, .bash_profile or .bashrc.

If it's coming up wrong when you start then you'll most likely find
there's an incorrect PATH setting in one of them already.

--
http://www.greenend.org.uk/rjk/
From: Ric on
On 12 July, 21:59, Richard Kettlewell <r...(a)greenend.org.uk> wrote:
> Ric <infobub...(a)gmail.com> writes:
> > Ahaha! ignore last post: just added those to the PATH command and
> > we're up and running: however when I restart terminal it forgets the
> > setting.  Where is the file that the SET command lists?  Presumably I
> > need to edit this in Pico and add the full path string to the end?
>
> Generally one (or more) of .profile, .bash_profile or .bashrc.
>
> If it's coming up wrong when you start then you'll most likely find
> there's an incorrect PATH setting in one of them already.
>
> --http://www.greenend.org.uk/rjk/

it was .bash_profile, thanks.
added PATH=/usr/bin:/usr/sbin:/bin:/usr/bin:/$PATH to this and it now
works.
also added the path to the android SDK and that works too.

thanks v much guys, much appreciated.


From: Chris Ridd on
On 2010-07-12 21:17:02 +0100, Ric said:

> On 12 July, 20:41, use...(a)alienrat.co.uk (Woody) wrote:
>> Ric <infobub...(a)gmail.com> wrote:
>>> Gents,
>>> Attempting to get Android SDK running and I think I've borked my bash
>>> profile. �Now, from a terminal window, most commands just give
>>> "command not found". �CD to a directory works, for example, but LS to
>>> list contents does not. �pico doesn't work. �I'm not sure what I've
>>> done and I've even less idea how to put it back to normal.
>>> Anyone able to help me out?
>>
>> If you type 'set' in the terminal what is your path?
>>
>> Mine is
>> PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/wo
>> ody/Projects/android-sdk-mac_x86-1.5_r1/tools
>>
>> hmm.. should change that last bit now that I don't have that folder!
>>
>> --
>> Woody
>>
>> www.alienrat.com
>
> Guys, ran PATH=/usr/bin:/usr/sbin:$PATH in terminal, and it executes,
> but when I then try an "ls" command it's still not found.
> After this, running "set" gives

No you didn't run what I typed, because you ended up with:

> PATH='/usr/bin:/usr/sbin:$'

Re-run it, without the apostrophes. Apostrophes and quotes are very
special in all shells (including bash) and you should never put them in
automatically unless you know what you're doing. (And you don't, at
least not yet :-)

Or just run:

PATH=/usr/bin:/usr/sbin:/bin:/sbin

without using $PATH in any way.

--
Chris