LWN.net Logo

Various notes on /usr unification

Various notes on /usr unification

Posted Feb 28, 2012 5:19 UTC (Tue) by pr1268 (subscriber, #24648)
Parent article: Various notes on /usr unification

As a Slackware (13.37) user, I'm curious how much impact usrmove would have on my system. Refer to:

me@mybox:~$ which ls
/usr/bin/ls
me@mybox:~$ file $(which ls)
/usr/bin/ls: symbolic link to `../../bin/ls'
me@mybox:~$ file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),  dynamically linked (uses shared libs), stripped

Apparently, Slackware places a lot of the "mission-critical" utilities in /bin and symlinks to them from /usr/bin1. Now, It'd be easy for me to move everything in /bin to /usr/bin (removing the symlinks first, of course), but then I'm wondering how much other stuff would break...

FWIW, my /usr is not on a separate partition. Accordingly, I'm guessing not much would break, and if it did, I could "restore" /bin via a symlink (as the article said other distros are doing). Might warrant some hacking time (after I back everything up first)...

> the practice of moving files and leaving a symbolic link in their place has a long history. Of course, somebody has probably patented it anyway.

On the one hand, our editor is known for his wry sense of humor. On the other hand, I get a little nervous sometimes when I think he might be closer to the truth with that statement than we'd like. :-\

1 I'm assuming this makes it easier for the shell to find executables as Slackware's profile scripts put /usr/bin in the $PATH earlier than /bin.


(Log in to post comments)

Various notes on /usr unification

Posted Feb 28, 2012 6:23 UTC (Tue) by josh (subscriber, #17465) [Link]

No, symlinks like that (from /usr/bin/$foo to /bin/$foo in Slackware's case, or from /bin to /usr/bin for the /usr merge) have nothing to do with $PATH search; they exist to avoid breaking hard-coded paths to programs. For instance, a program might expect to find "/bin/bash".

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds