Why is /bin linked to /usr/bin?

General support questions
Post Reply
jwwskymaster
Posts: 17
Joined: 2010/11/07 03:44:45
Location: Vancouver, B.C.

Why is /bin linked to /usr/bin?

Post by jwwskymaster » 2014/11/02 07:06:59

This is causing a problem placing a front end in /bin, that runs before executing the real one in /usr/bin.

Sample script in /bin called mycommand

#!/bin/sh
# Do my stuff
.
.
.
exec /usr/bin/mycommand

A sample use of this could be to log every use of a system command, that normally lives in /usr/bin.

If PATH is set like PATH=/bin:/usr/bin

Then all is fine on systems that do not link /bin to /usr/bin.

What is the purpose of linking them?
Is this something that is going to be changed?

I guess I can come up with a work around by adding a new directory like /frontend, and add that to the PATH like
PATH=/frontend:/bin:/usr/bin

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Why is /bin linked to /usr/bin?

Post by TrevorH » 2014/11/02 13:00:48

This is the way of the future and is part of something called the usrmove project. It's not going away so you have to find a new way to do what you want.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply