Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

/bin and /usr/bin?

0 views
Skip to first unread message

Alexander Dong Back Kim

unread,
Jul 11, 2008, 9:29:29 PM7/11/08
to
Dear all,

I found out /bin and /usr/bin contain the same command binaries such
as "ls" and "rm".
Is there any reason why the both directories contain the same(?)
command files? or are the commands different? Can't we just use link
instead?

cheers,
AK

frank87

unread,
Jul 15, 2008, 6:33:37 PM7/15/08
to
On 2008-07-12, Alexander Dong Back Kim <alex...@gmail.com> expressed:

The binaries used to boot the system are in /bin (probably staticaly
linked). The binaries for genaral use are in /usr/bin .

During boot the system should work only on the root-filesystem (usr is
mounted later).

Greetings,
Frank

Erik van der Kouwe

unread,
Jul 16, 2008, 3:21:55 AM7/16/08
to
> The binaries used to boot the system are in /bin (probably staticaly
> linked). The binaries for genaral use are in /usr/bin .

All Minix binaries are statically linked, as the a.out format used on
Minx does not support dynamic linking.

--
With kind regards,
Erik van der Kouwe

Greg King

unread,
Jul 21, 2008, 7:28:24 AM7/21/08
to
frank87 wrote ...
> On 2008-07-12, Alexander Dong Back Kim expressed:
>>
>> I found out "/bin/" and "/usr/bin/" contain the same command binaries
>> such
>> as "ls" and "rm".
>> Is there any reason why both directories contain the same(?)
>> command files? Or, are the commands different? Can't we just use links
>> instead?
>
> The binaries used to boot the system are in "/bin/".
> The binaries for genaral use are in "/usr/bin/".
> During boot, the system should work only on the root-filesystem ("/usr/"
> is
> mounted later).

Compatibility, with _many_ POSIX systems, might be the reason. Some OSes
put them in "/bin/", while other OSes put them in "/usr/bin/". Putting the
names in both directories makes it easier to port programs from those other
systems (scripts don't need to be changed).

But, I, too, wonder why "/usr/bin/" contains full copies instead of
soft-links to "/bin/" -- that wastes disk space.

0 new messages