News for hackers. Stuff that matters.
Re:Understanding the bin, sbin, usr/bin , usr/sbin split by gchpaco on Friday January 27, 2012 @05:24PM (#3520473)
The central thing about all these conventions is they developed in the absence of good union mounts. In Plan 9 there is no $PATH: all such things are bound into /bin. This works both because Plan 9 has very good union mounts, but also because those union mounts can be localized to a specific process and as a result are user accessible. I seem to recall some work was done to make this possible on Linux but It didn't get accepted into the main kernel because it is at odds with how we see how a Unix system should behave.

It would be interesting to see a Linux distro that embraced this.

Re:Understanding the bin, sbin, usr/bin , usr/sbin split by pmarin on Friday January 27, 2012 @05:32PM (#3520504)
I wonder why rc still has $path in Plan9.

   term% echo $path
   . /bin
What happen with Ape ports whom expect the path environment variable?
Re:Understanding the bin, sbin, usr/bin , usr/sbin split by p9idf on Friday January 27, 2012 @09:20PM (#3521119)
Ape's execlp() tries first the program name passed to it (be it relative or absolute), and if that fails it prepends "/bin/" and tries again. It ignores environment variables entirely.†

Rc's path variable allows you to easily tell rc to check the current directory when looking for programs to exec. Doing that with bind after each cd would be clumsy. And if your working directory is a remote server, you can set path to just /bin so that you aren't statting the remote directory before each exec. Inferno's sh does use a path variable, but it is typically left unset and the default (/dis .) is used.††

† See http://plan9.bell-labs.com/sources/plan9/sys/src/ape/lib/ap/...

†† See /usr/inferno/appl/cmd/sh/sh.b:/^runexternal

Re:Understanding the bin, sbin, usr/bin , usr/sbin split by 4ad on Friday January 27, 2012 @05:37PM (#3520519)
rc has $path because rc predates Plan9, it first appeared in tenth edition Unix.

Inferno's shell doesn't use a $path variable.