Discussion:
Use of symlinks for /bin and /usr/bin
(too old to reply)
Jim
2024-05-01 15:05:18 UTC
Permalink
My attempt to send this to dev and discuss at ml.mageia.org
is not working (haven't used it in a year or three) so I
am posting it here where Jim Whitby may find it.
Where is this defined?
I won't go into the long story, suffice it to say I found
out the hard
way it is set as
/usr/bin:/bin
/bin being a link to /usr/bin why even have /bin there?
More important (to me) is the fact that /usr/sbin isn't
there.
I have added the path to the default crontab for root, so
everything
works now.
It just seems wrong to me about the default.
Anyone explain to me where I'm not right?
Drawing on UNIX memories of the 1980s of a non-expert,
that in turn were from UNIX Version 7 of the 1970s,

/bin was intended to contain binaries mainly used by root or
other single user. /usr/bin was intended to contain
binaries routinely used by ordinary users.

/sbin /usr/sbin was set up in similar fashion, with
contents confined to specific system executables.

Paired directories in part allowed faster access to the
desired executable, a significant factor on machines with
only a tape drive or very little space on a slow disk drive.
In the latter case, the two were on separate partitions
or separate hard drives.

Revisions to the file system access software in the wake
of enormously larger disks that were much faster made
it more efficient to throw everything in one place.

A problem arose in that enormous numbers of scripts
specified exactly one of the two. If such a script looked
in /usr/bin it would not necessarily find or be able to
access (due to permissions, etc) a file in /bin, regardless
of exact path in the script.

The simple solution was to throw everthing in one place
and symlink the directories to avoid problems in obsolete
scripts not finding the desired executable in some
circumstances.

Another explanation may be found at

https://unix.stackexchange.com/questions/266517/why-is-bin-a-symbolic-link-to-usr-bin

Cheers!

jim b.
--
UNIX is not user-unfriendly, it merely
expects users to be computer friendly.
jim whitby
2024-05-01 21:24:59 UTC
Permalink
On Wed, 1 May 2024 15:05:18 -0000 (UTC), Jim wrote:

<snip>
The simple solution was to throw everthing in one place and symlink the
directories to avoid problems in obsolete scripts not finding the
desired executable in some circumstances.
Another explanation may be found at
https://unix.stackexchange.com/questions/266517/why-is-bin-a-symbolic-
link-to-usr-bin
Cheers!
jim b.
Thanks.

This I understand, my question was more about why there weren't any other
paths. Like /usr/sbin included, which contains the commands not meant for
mere mortals.
--
Jim Whitby


It is Homer who has chiefly taught other poets the art of telling lies
skillfully.
~ Aristotle
----------------------
Mageia release 9 (Official) for x86_64
6.6.28-server-1.mga9
----------------------
Jim
2024-05-02 13:57:32 UTC
Permalink
Post by jim whitby
<snip>
The simple solution was to throw everthing in one place and symlink
... >> jim b.
Post by jim whitby
Thanks.
This I understand, my question was more about why there weren't any other
paths. Like /usr/sbin included, which contains the commands not meant for
mere mortals.
I can only guess it is a trade-off between grouping things of like
function for human convenience and arranging things for the computer's
inanimate efficiency. Those who made those decisions could explain
their decisions...

Cheers!

jim b.
--
UNIX is not user-unfriendly, it merely
expects users to be computer friendly.
Loading...