From: John Kelly on
On Wed, 30 Jun 2010 23:37:52 +0200, Janis Papanagnou
<janis_papanagnou(a)hotmail.com> wrote:

>On 30/06/10 22:59, John Kelly wrote:

>> Putting /usr/bin ahead of /bin in your path, causes an extra path search
>> every time you invoke sed, or any other common utility.

>>Shouldn't that be covered by cashing ("hashing", "tracked alias")?
>I.e., without sacrificing the path precedence (overriding) feature.

Only if you have that shell feature enabled, which may not be desirable.


--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: Sven Mascheck on
Janis Papanagnou wrote:

> Am I reading that correctly; that you confirm my memories for those
> commercial Unix systems (AIX, HP-UX, and SunOS) that I worked on?

Hm, well, sorry for the media break?

Yes, /bin links to /usr/bin at least on AIX 3.2.4-5.3, HP-UX
10.x-11.31, SunOS 4.1.4-5.11, but AFAIK not on HP-UX 8.07-9.03
(which I'd count as virtually historic).

> Cygwin is probably no good example, but there you have equal /bin
> and /usr/bin contents as well.

It's defintely missing in the list, yet.
From: Seebs on
On 2010-06-30, Janis Papanagnou <janis_papanagnou(a)hotmail.com> wrote:
> Seebs schrieb:
>> [...]
>> More generally, the same pattern applies to any other bin directory; if
>> you have a bin directory that's specific to a working project, or a personal
>> bin directory, it's put in front of /usr/local, which is in turn in front
>> of plain /usr/bin and /bin, [...]

> Curious; are there systems where /usr/bin and /bin are not equivalent
> (or even identical [by one directory linking the other])?

Yes, many.

> I don't recall having worked on a Unix system with different contents
> in those two directories.

Which is funny, because I can't think of one where they're the same. I
only have Linux, OS X, and BSD to check, but all three, they're separate.
By convention, /bin is part of the rootfs, but /usr is a separate file
system in some designs, so /usr/bin holds stuff that's not necessary
during early boot but is pretty essential later.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Janis Papanagnou on
On 02/07/10 05:05, Seebs wrote:
> On 2010-06-30, Janis Papanagnou <janis_papanagnou(a)hotmail.com> wrote:
>> Seebs schrieb:
>>> [...]
>>> More generally, the same pattern applies to any other bin directory; if
>>> you have a bin directory that's specific to a working project, or a personal
>>> bin directory, it's put in front of /usr/local, which is in turn in front
>>> of plain /usr/bin and /bin, [...]
>
>> Curious; are there systems where /usr/bin and /bin are not equivalent
>> (or even identical [by one directory linking the other])?
>
> Yes, many.
>
>> I don't recall having worked on a Unix system with different contents
>> in those two directories.
>
> Which is funny, because I can't think of one where they're the same. I
> only have Linux, OS X, and BSD to check, but all three, they're separate.

Is your BSD a FreeBSD, or else, what version? Someone pointed out here
that it wouldn't apply to Sun's OS (which was, as SunOS [4.x], also
based on BSD before becoming Solaris). See also Sven's reply in this
thread. It seems that depending on the perspective one looks at the
topic, coming from the commercial Unixes (as I do) or from the open
source Unixes (as it's common nowadays), one may get only a partially
correct view on the topic.

Janis

> [...]
From: David Combs on
Or, if you want complete, EXPLICIT control of whose version gets
called, I've done this kludge:

Put "my-bin-symlinks-DIR" at the HEAD (first) of PATH.

Then, in that dir, for, say, "rm", make it a SYMLINK
to YOUR "rm".

That way, when you say "rm", it runs through PATH,
looking for an "rm", and FINDS IT, in your kludge-symlink
directory.

Warning: when you (before 10) do a ufsdump, you will
likely have only one or two disk partitions "up" --
just make sure that that rm symlink points into a
during-backup mounted partition.

The Advantage of this litle scheme is that what
version (and owner) gets run IS TOTALLY OBVIOUS --
SELF DOCUMENTED.

And, if some binary verion you want to override
say "rm" is off on a NOT-mounted-at-backup-time disk,
then just COPY that binary to some central place
for such binaries, which place WILL be mounted,
even during backup (and restore).


And, it's dead simple.


David