Thread: "/usr/bin" supposed to exist?

"/usr/bin" supposed to exist?

From
stephan.rupp@gmx.net
Date:
<div align="left"><font face="Times New Roman"><span style="font-size:10pt">Hello, all,</span></font></div><div
align="left"><br/></div><div align="left"><font face="Times New Roman"><span style="font-size:10pt">trying to get my
PostgreSQLrunning under CygWin, I read somewhere about "/usr/bin".</span></font></div><div align="left"><font
face="TimesNew Roman"><span style="font-size:10pt">Is this directory (and - of course - the potential program files in
thisdirectory) supposed to exist?</span></font></div><div align="left"><font face="Times New Roman"><span
style="font-size:10pt">Inmy CygWin installation, it <u>does not</u> exist.</span></font></div><div align="left"><br
/></div><divalign="left"><font face="Times New Roman"><span style="font-size:10pt">Thanks in advance for your
answers.</span></font></div><divalign="left"><br /></div><div align="left"><font face="Times New Roman"><span
style="font-size:10pt">Kindregards</span></font></div><div align="left"><font face="Times New Roman"><span
style="font-size:10pt">Stephan</span></font></div><divalign="left"><br /></div><div align="left"><br /></div><div
align="left"><br/></div><div align="left"><font face="Times New Roman"><span style="font-size:10pt">--
</span></font></div><divalign="left"><br /></div><div align="left"><font face="Times New Roman"><span
style="font-size:10pt">StephanRupp</span></font></div><div align="left"><font face="Times New Roman"><span
style="font-size:10pt">-Philologe / Netzwerkspezialist -</span></font></div><div align="left"><font face="Times New
Roman"><spanstyle="font-size:10pt">Mirabeauweg 4</span></font></div><div align="left"><font face="Times New
Roman"><spanstyle="font-size:10pt">D-72 072  Tübingen</span></font></div><div align="left"><font face="Times New
Roman"><spanstyle="font-size:10pt">Tel.: +49 (7071) 84093</span></font></div><div align="left"><font face="Times New
Roman"><spanstyle="font-size:10pt">Fax: +49 (7071) 84048</span></font></div><div align="left"><font face="Times New
Roman"><spanstyle="font-size:10pt">E-Post:  stephan.rupp@gmx.net</span></font></div><div align="left"><font face="Times
NewRoman"><span style="font-size:10pt">                stephan.michael.rupp@t-online.de</span></font></div><div
align="left"></div>

Re: "/usr/bin" supposed to exist?

From
Peter Eisentraut
Date:
stephan.rupp@gmx.net writes:

> trying to get my PostgreSQL running under CygWin, I read somewhere about "/usr/bin".
> Is this directory (and - of course - the potential program files in this directory) supposed
> to exist?

The PostgreSQL installation routine creates all directories that it needs,
so none need to exist.  Of course, /usr/bin not existing is pretty
unusual.  Where are all the programs belonging to your operating system
installed?

--
Peter Eisentraut   peter_e@gmx.net


Re: "/usr/bin" supposed to exist?

From
"Cornelia Boenigk"
Date:
Hi

if you try to find /usr/bin in Windows explorer: you don't see it,
seems not available.
if you run the cygwin bash and cd to /usr/bin you will see all
programmes installed.

Regards
Conni


Re: "/usr/bin" supposed to exist?

From
Jason Tishler
Date:
On Fri, Oct 03, 2003 at 04:09:40PM +0200, Cornelia Boenigk wrote:
> if you try to find /usr/bin in Windows explorer: you don't see it,
> seems not available.  if you run the cygwin bash and cd to /usr/bin
> you will see all programmes installed.

Under Cygwin, /usr/bin is a mount point:

    $ mount | fgrep /usr/bin
    C:\Cygwin\bin on /usr/bin type system (binmode)

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: "/usr/bin" supposed to exist?

From
Frank Seesink
Date:
Jason Tishler wrote:
> On Fri, Oct 03, 2003 at 04:09:40PM +0200, Cornelia Boenigk wrote:
>
>>if you try to find /usr/bin in Windows explorer: you don't see it,
>>seems not available.  if you run the cygwin bash and cd to /usr/bin
>>you will see all programmes installed.
>
>
> Under Cygwin, /usr/bin is a mount point:
>
>     $ mount | fgrep /usr/bin
>     C:\Cygwin\bin on /usr/bin type system (binmode)

Not sure, but this user may be experiencing the wonderful phantom
/usr/bin issue, where /usr/bin is there if you type a command like

    cd /usr/bin

but if you type

    cd /usr
    ls

you don't see it.  This has happened to me twice now in the past 6
months.  Not sure why, other than Cygwin setup.exe or one of the post
install scripts mangling something along the way.

I found a post online someplace (Google for "missing Cygwin /usr/bin
directory") on how to get things back the way they should be.  It
basically involved ripping out the mount and then rebuilding it.  But be
careful, because without the /usr/bin mounting, any commands you type
(like 'ls') may require the full path.  Basically, to "rebuild" things
so /usr/bin appears, do the following (assuming you have Cygwin
installed at 'C:\cygwin'; adjust as necessary):

$ cd /usr
$ umount /usr/bin
$ /bin/rmdir bin
$ /bin/mkdir bin
$ /bin/mount -f -s -b "C:/cygwin/bin" "/usr/bin"

This should set things so you see the /usr/bin directory again.

Note I have not had an issue with apps not working when this occurs.  It
is just that there does not "appear" to be a ./bin directory in /usr.
All the usual commands, though, work to access the files at this mount
point.  Very weird.  But I like directory listings to show things
properly, so I do the above when necessary.


Re: "/usr/bin" supposed to exist?

From
Jason Tishler
Date:
Frank,

On Sat, Oct 04, 2003 at 06:14:31PM -0400, Frank Seesink wrote:
> Note I have not had an issue with apps not working when this occurs.  It
> is just that there does not "appear" to be a ./bin directory in /usr.
> All the usual commands, though, work to access the files at this mount
> point.  Very weird.

Do you have /bin in your PATH?  If so, then this would explain the
above.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: "/usr/bin" supposed to exist?

From
stephan.michael.rupp@t-online.de
Date:
Hello, Frank,

> Jason Tishler wrote:
> > On Fri, Oct 03, 2003 at 04:09:40PM +0200, Cornelia Boenigk wrote:
> >
> >>if you try to find /usr/bin in Windows explorer: you don't see it,
> >>seems not available.  if you run the cygwin bash and cd to /usr/bin
> >>you will see all programmes installed.
> >
> >
> > Under Cygwin, /usr/bin is a mount point:
> >
> >     $ mount | fgrep /usr/bin
> >     C:\Cygwin\bin on /usr/bin type system (binmode)
>
> Not sure, but this user may be experiencing the wonderful phantom
> /usr/bin issue, where /usr/bin is there if you type a command like
>
>     cd /usr/bin
>
> but if you type
>
>     cd /usr
>     ls
>
> you don't see it.

That's it exactly, Frank!

Does this has any impacts on the functionality of CygWin/PostgreSQL (besides the fact
that I don't   s e e   it...)?

Kind regards
Stephan

> This has happened to me twice now in the past 6
> months.  Not sure why, other than Cygwin setup.exe or one of the post
> install scripts mangling something along the way.
>
> I found a post online someplace (Google for "missing Cygwin /usr/bin
> directory") on how to get things back the way they should be.  It
> basically involved ripping out the mount and then rebuilding it.  But be
> careful, because without the /usr/bin mounting, any commands you type
> (like 'ls') may require the full path.  Basically, to "rebuild" things
> so /usr/bin appears, do the following (assuming you have Cygwin
> installed at 'C:\cygwin'; adjust as necessary):
>
> $ cd /usr
> $ umount /usr/bin
> $ /bin/rmdir bin
> $ /bin/mkdir bin
> $ /bin/mount -f -s -b "C:/cygwin/bin" "/usr/bin"
>
> This should set things so you see the /usr/bin directory again.
>
> Note I have not had an issue with apps not working when this occurs.  It
> is just that there does not "appear" to be a ./bin directory in /usr.
> All the usual commands, though, work to access the files at this mount
> point.  Very weird.  But I like directory listings to show things
> properly, so I do the above when necessary.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>



--

Stephan Rupp
- Philologe / Netzwerkspezialist -
Mirabeauweg 4
D-72 072  Tübingen
Tel.: +49 (7071) 84093
Fax: +49 (7071) 84048
E-Post:    stephan.rupp@gmx.net
    stephan.michael.rupp@t-online.de



Re: "/usr/bin" supposed to exist?

From
Frank Seesink
Date:
Jason Tishler wrote:
> Frank,
>
> On Sat, Oct 04, 2003 at 06:14:31PM -0400, Frank Seesink wrote:
>
>>Note I have not had an issue with apps not working when this occurs.  It
>>is just that there does not "appear" to be a ./bin directory in /usr.
>>All the usual commands, though, work to access the files at this mount
>>point.  Very weird.
>
>
> Do you have /bin in your PATH?  If so, then this would explain the
> above.

Actually, I do have /bin in my PATH.  I do a very simple Cygwin install,
and it appears to be there by default.  So yeah, that is likely why
commands, etc., continue to work.  Though the strange thing is that when
you do the umount command I mention, it sometimes happens that you can't
just type 'mount'...it's as if /bin ISN'T in the PATH even though it is.
  Very odd.

My comments regarding having to use the full path in rebuilding /usr/bin
so you can see it via 'ls' were more in case Stephan did not have /bin
in his PATH or found himself getting these kinds of error messages.
When in doubt, absolute paths beat relative ones. ;-)

The issue of /usr/bin disappearing from listings, however, is an odd
one.  Still not sure what causes it.  I remember the first time I
noticed this and fixed it.  A few months later, I looked and again,
/usr/bin did not appear to be there.  Just weird.


Re: "/usr/bin" supposed to exist?

From
Frank Seesink
Date:
stephan.michael.rupp@t-online.de wrote:

> Hello, Frank,
>
>
...
>>Not sure, but this user may be experiencing the wonderful phantom
>>/usr/bin issue, where /usr/bin is there if you type a command like
>>
>>    cd /usr/bin
>>
>>but if you type
>>
>>    cd /usr
>>    ls
>>
>>you don't see it.
>
>
> That's it exactly, Frank!
>
> Does this has any impacts on the functionality of CygWin/PostgreSQL (besides the fact
> that I don't   s e e   it...)?

Stephan,

As mentioned by Jason in another post, if you have /bin in your PATH,
odds are no, it will not affect things.  However, you may wish to do as
I mentioned in my post just to 'restore' things to the way they should
be.  In the end, /usr/bin is just a link to /bin anyway (take a look
from Windows Explorer and you'll see only C:\cygwin\bin exists, but
there's no C:\Cygwin\usr\bin), but it's nice to have things as most
Cygwin users/developers expect. ;-)

Not sure what causes this.  My suspicion lies with something in the
Cygwin setup.exe's way of handling package updates (possibly the
post-install scripts?), as I've run into various minor (and some
not-so-minor) issues when doing updates.


Re: "/usr/bin" supposed to exist?

From
Jason Tishler
Date:
Frank,

On Mon, Oct 06, 2003 at 10:50:17PM -0400, Frank Seesink wrote:
> Jason Tishler wrote:
> >Do you have /bin in your PATH?  If so, then this would explain the
> >above.
>
> Actually, I do have /bin in my PATH.  I do a very simple Cygwin
> install, and it appears to be there by default.  So yeah, that is
> likely why commands, etc., continue to work.  Though the strange thing
> is that when you do the umount command I mention, it sometimes happens
> that you can't just type 'mount'...it's as if /bin ISN'T in the PATH
> even though it is.  Very odd.

<WAG>
Maybe the above is due to bash's hashing of commands:

    $ type mount # first time mount is executed
    mount is /usr/bin/mount
    $ mount
    ...
    $ type mount
    mount is hashed (/usr/bin/mount)
</WAG>

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6