Slashdot Mirror


Rage Against the File System Standard

pwagland submitted a rant by Mosfet on file system standards. I think he's sort of over simplified the whole issue, and definitely wrongly assigned blame, but it definitely warrants discussion. Why does my /usr/bin need 1500 files in it? Is it the fault of lazy distribution package management? Or is it irrelevant?

231 of 612 comments (clear)

  1. Why not go the extra step by Hektor_Troy · · Score: 2, Insightful

    and just install in /?

    Who in their right mind places stuff outside of a program specific folder, if it's not gonna be used in multiple programs (like shared libraries)?

    --
    We do not live in the 21st century. We live in the 20 second century.
  2. Still new to GNU/Linux by PigeonGB · · Score: 2, Interesting

    Is it really that bad? Would I not have much control over where programs get installed to?
    I would think that even without a package handler to do it for me, the program itself would allow me to say where it should be installed...or is that just the Windows user in me talking?

    --
    I have 3656.9 Bogomips. How many Bogomips do you have?
  3. The Alternative? by Mike+Connell · · Score: 4, Redundant

    I'd much rather have 2000 binaries in /usr/bin than 2000 path entries in my $PATH

    Mike

    1. Re:The Alternative? by dattaway · · Score: 2, Interesting

      Is there such thing as a recursive PATH directive for executables? Like the ls -R or something for searching into subdirectories?

    2. Re:The Alternative? by kaisyain · · Score: 3, Interesting

      You would only need 2000 path entries if your expect your shell to have the same exact semantics that it does today. There is no reason whatsoever that PATH couldn't mean "for every entry in my PATH environment variable look for executables in */bin". A smart shell could even hide all of these behind the scenes for you and provide a shell variable SMART_PATH that gets expanded to the big path for legacy apps.

      Or you could do what DJB does with /command and symlink everything to one place. Although I'm not sure if that solves the original complaint. Actually, I'm not sure what the original complaint is, having re-read the article.

    3. Re:The Alternative? by Meleneth · · Score: 5, Insightful

      *sigh*

      has anyone heard of symlinks? the theory is very simple - install the app into /opt/foo or wherever, then symlink to /usr/local/bin. yawn.

      or is that one of those secrets we're not supposed to tell the newbies?

      --
      remote access CLI with tools is the only friend you'll ever need.
    4. Re:The Alternative? by Anonymous Coward · · Score: 5, Informative
      I'd much rather have 2000 binaries in /usr/bin than 2000 path entries in my $PATH



      Here's what every unix administrator I know (including myself) does:

      1. everything is installed in /opt, in its own directory:

        example$ ls /opt
        apache emacs krb5 lsof mysql openssl pico ucspi-tcp
        cvs iptables lprng make-links openssh php qmail

        (pico is for the PHBs, by the way)
      2. Every version of every program gets its own directory

        example$ ls /opt/emacs
        default emacs-21.1

      3. Each directory in /opt has a 'default' symlink to the version we're currently using

        example$ ls -ld /opt/emacs/default
        lrwxrwxrwx 1 root root 10 Oct 23 16:33 /opt/emacs/default -> emacs-21.1

      4. You write a small shell script that links everything in /opt/*/default/bin to /usr/local/bin, /opt/*/default/lib to /usr/local/lib, etc.

      Uninstalling software is 'rm -rf' and a find command to delete broken links. Upgrading software is making one link and running the script to make links again. No need to update anyone's PATH on a multi-user system and no need to mess with ld.so.conf. You can split /opt across multiple disks if you want. NO NEED FOR A PACKAGE MANAGER. This makes life much easier, trust me.
    5. Re:The Alternative? by El+Prebso · · Score: 2, Informative

      There is actually a Package Manager that does all this for you, only it make everything alot easier.

      http://pack.sunsite.dk/

      --
      I didn't say it was your fault. I said I was going to blame it on you.
    6. Re:The Alternative? by Zocalo · · Score: 2

      I don't recall LFS saying you couldn't use "/usr/appname", so the article title is a bit misleading, but you certainly don't need 2000 entries in your path. The best solution for the problem that I can see is for coders of the multi-binary applications to take a leaf out of Windows' book and use the equivalent of "C:\Program Files\Common Files". Using an application (or environment, or vendor) specific directory for programs that only other programs need to use. The best I can see would be to use "/usr/appname/" for binaries and "/usr/lib/appname/" for libraries.

      --
      UNIX? They're not even circumcised! Savages!
    7. Re:The Alternative? by AndyElf · · Score: 3, Informative
      Section 4.1 of FHS:

      Large software packages must not use a direct subdirectory under the /usr hierarchy.
      --

      --AP
    8. Re:The Alternative? by sydb · · Score: 2

      Well, I like package managers (I apt-get) as much as the next person, but the man has a point; what happens when your package management is broken? rm -rf is unlikely to break. I've seen a few broken package management databases.

      --
      Yours Sincerely, Michael.
    9. Re:The Alternative? by sydb · · Score: 2

      <sarcasm>Yeah your right, as soon as my needs exceed about 100 applications, I should go buy a new computer.</sarcasm>

      I'm joking. A server? perhaps a handful of apps is reasonable. A desktop? I install new applications (if you can use the word to describe small utilities) every couple of days. Of course I need scope for 2000 apps on my machine. I have thousands of things I want to do with my computer, not just one or two. And with an 80Gb hard disk, the only way I could fill that with data would be endless MP3s or video sequences, which I don't do, so why shouldn't I fill it with apps?

      --
      Yours Sincerely, Michael.
    10. Re:The Alternative? by -brazil- · · Score: 2, Informative

      Um... You still want to RUN those applications, yes? And you don't want to remember and type in the full path for 2000 executables, yes? So you want your shell to find the executables for you. Which is what the PATH variable is for.

      --

      The illegal we do immediately. The unconstitutional takes a little longer.
      --Henry Kissinger

    11. Re:The Alternative? by SuperQ · · Score: 2, Interesting

      You miss one critical problem. package management doesn't just handle path issues.. it handles dependancies, conflicts, version control, etc.

      unfortunaltly, not all software is written to the same standards. some code comes with Makefiles that have hard-coded paths, different build systems, hard-coded -L paths, things that make installing software on a random system painfull.

      Package management is a way to standardize the way software is installed, upgraded, and removed.

      I work in a system where we maintain our own software packages. the system was originaly slackware, but is now a custom distribution for our 200 odd linux workstations. Some days I would like to burn it to the ground, and replace it with a sane package managed system (debian). We have no real automated way to build the system up from source. software that conflicts is just piled on top of each other durring our automated install process. upgrading packages is painfull.

      basicaly what we do to update the software on workstations is to have the workstations format, and re-install with an automated build process once ever 2 months. that way over a period of 2 months, we get all of our software fixes out to the workstations. we also have scripts to automate emergency patches to all workstations.

      sometimes this is nice, because as we have to make changes to the system (new version of fvwm2 breaks old user config files). we only get calls every few days, and not all at once in the morning. and it keeps users from depending on /tmp for storage, it forces them to use their home dir for storage.

      but having two people reproduce the work of a linux development group seems to be a waste of time in the long run. I am currently trying to come up with a good, solid sales pitch for my boss and senior admin to move us to a debian base system. and for us as a department to use our system maintence time to help give back to the debian community.

    12. Re:The Alternative? by ader · · Score: 3, Informative
      Correct: this is not rocket science, people. It's called a software depot (at least it is now - see The Practice of System and Network Administration by Limoncelli & Hogan, chapter 23).

      How many directories in /usr does Mosfet want? One for X11, KDE, GNOME ... TeX, StarOffice, Perl, GNU, "misc", etc?? How large a PATH will that create?

      Actually, it's perfectly possible to use a separate directory for every single package - right down to GNU grep - if you:
      1. symlink all the relevant subdirectories for every package into a common set that is referred to in the various PATHs;
      2. manage those symlinks in some automated fashion.

      For the latter, try GNU Stow or (my favourite) Graft (available via Freshmeat). These tools could even be easily run as part of a package management post-install procedure.

      The depot approach has a number of advantages, not least of which the ease of upgrading package versions and maintaining different versions concurrently. And it's obvious what's installed and which files they provide.

      The challenge is in encouraging the vendors to embrace such a model as an integral part of their releases; that would require some significant reworking.

      Ade_
      /
      --
      Big Bubbles (no troubles) - what sucks, who sucks and you suck
    13. Re:The Alternative? by dinotrac · · Score: 2

      Package managers don't fully handle path issues.
      They don't, for example, handle multiple versions of the same software very well.

      You can, I suppose, do the kludge of attaching a version number to the end of every file name, but that's even more ugly than multiple directories and may even snag some code.

    14. Re:The Alternative? by guinsu · · Score: 2

      Then doesn't that indicate that Linux needs a better system to manage this many applications in their own directories? Why keep it the way its always been if its getting unmanagable? Open source developers are really good at fixing problems like this, it shouldn't be too hard for someone to come up with a good idea.

    15. Re:The Alternative? by Galvanick+Lucipher · · Score: 2, Insightful

      Every unix administrator I know does _not_ do it that way. That way seems crazy to me. You still end up with 1500 links in /usr/local/bin and without a package manager you have no dependency tracking, no automated update system, nada.

      I would much rather have a good package manager. I don't care if there are 2000 files in /usr/bin as long as the filesystem driver can handle it (and any good filesystem can) and I can do "rpm -qf *" (or equivalent) and see the package ownership of every file in the directory. This whole thing is a non-issue. If you do "ls /usr/bin" and get freaked out by the size of the output you need to change your preconceptions, not your filesystem.

    16. Re:The Alternative? by jcostom · · Score: 4, Insightful
      The alternative? Simple. /opt.

      Mosfet's not talking about a new directory for every little application. He's talking about moving out stuff like KDE and GNOME. So instead of just having /usr/bin in your $PATH, you would also include /opt/gnome/bin and/or /opt/kde/bin. Yes, this makes your path a bit larger, but unmanagable? Hardly.

      I just checked on one of my PCs that has KDE2 installed (from the RH 7.2 RPMs), and there are over 200 files that match /usr/bin/k*. The only one that wasn't a part of KDE was ksh. My /usr/bin has 1948 files in it. There's a 10% reduction with one change. I don't have GNOME installed on this box, so a similar comparison isn't really possible. However, I imagine that the number would be similar if not greater for GNOME.

      It's not like he's suggesting we sacrifice goats in the street. He's suggesting we actually implement what the FSS says.

      --

      The unsig!
    17. Re:The Alternative? by MarkCC · · Score: 5, Insightful

      The system does not go through all of the directories in the path every time you type a command. No shell that I know of is stupid enough to do that.

      Shells do a lot of cacheing. The most common strategy these days is to automatically regenerate the path cache every time you change your cache. Many shells also have a way of manually directing it to rebuild it's cache.

      With an intelligently designed cache, the memory use difference between cacheing binaries from a small number of huge directories, and a huge number of small directories is small to zero.

      That said, I still disagree with Mosfet. I've also done time as a sysadmin. Personally, I think that having the binaries stored together is preferable, because I'm capable of using a package manager to manage my applications; but many of my users find it extremely difficult to deal with paths. (Not to mention the degree of sensitivity it produces when you change a system. If I use RPM to install a new version of something, then the RPM database id modified with information about the new version. If I install something in a way that modifies the directory heirarchy, then I have to make sure that every user of my system correctly modifies their path.

      Personally, I think RPM style package managers are a huge step forwards, and they make the admins job a lot easier. Why should I care that there are thousands of files in my /usr/bin, as long as I have a useful tool for managing them?

      Now, data files are a different matter... But they get separate directories in the current style. So that's not a problem.

    18. Re:The Alternative? by heh2k · · Score: 2, Insightful
      NO NEED FOR A PACKAGE MANAGER

      one word: dependencies

    19. Re:The Alternative? by bc3-au · · Score: 2, Insightful
      As several people point out, install the packages into their own area (/usr/local/package ?) and then symlink the binaries you require.

      All well and good, but this sort of thing gets on my nerves:

      mkdir /usr/local/samba
      cd /usr/local/samba

      # /usr is a very stupid place to keep logfiles - /var is for dynamic stuff
      mkdir /var/log/samba
      ln -s /var/log/samba var
      # And why the &&&*&^%&& would I want manpages in their own little trees - 1 per package where I can't read them without stupid man options ?????
      ln -s /usr/local/man man

      # Now we can get to and install the bloody thing - because of the symlink the manpages will be put with the others where man and apropos can find them
      cd /usr/src/samba/source
      make install

      # cd /usr/local/bin
      ln -s /usr/local/samba/bin/smbstatus smbstatus
      .... etc

      The trouble is that many packages install multiple classes of data into their trees (bloody postgres will wack a database area onto your /usr partition if you don't watch it carefully)

      This is especially a problem if you're setting up network shared partitions. (netboot anyone ?)

    20. Re:The Alternative? by -brazil- · · Score: 2, Insightful
      "Could you help me please? You see, I just wrote this new shell script, and the shell says it can't find it, but I didn't mistype it, and I did set the executable bit..."


      Imagine the above, 5 times a day, in greatly varying shades of cluefulness and politeness...

      --

      The illegal we do immediately. The unconstitutional takes a little longer.
      --Henry Kissinger

    21. Re:The Alternative? by Icy · · Score: 2, Informative

      You would not have 2000 PATH entries, only a few dozen. That would go completely against what the author is trying to say. You would group programs by what they do or whose program they belong too. I recently noticed that on my FreeBSD server, the postgresql port now installs its files into /usr/local/ while it used to install everything into /usr/local/pgsql/ by default. Although this makes it much easier with paths and such, it makes it much harder to say back up everything or even to just know what programs are included (although you can just make a package or use pkg_info). The one thing that i don't like is that its harder to have two different versions of a program since spreading it through /usr/local make installing the new version clobber the old.

    22. Re:The Alternative? by cloudmaster · · Score: 2

      hmm, could you then, say,

      find / -type s -e checklink

      where checklink is a shell script like this:

      #!/bin/bash
      if ls -L $1 2>/dev/null; then
      return 1;
      else
      rm -i $1;
      return 0;
      fi


      Boy, that's really, really hard. I'd better use a package manager instead of risking broken symlinks. :) Heck, wrap that if/else/fi inside of a "for F in `find $1 -type s`; do/done" and you'll have a symlink program like the other guy mentioned, and it'll even take a directory to check as an argument. Whee. Take out the "-i" in the rm to delete without confirming (replace it with "-v" to print what it's deleting)

    23. Re:The Alternative? by psamuels · · Score: 4, Informative
      The system does not go through all of the directories in the path every time you type a command. No shell that I know of is stupid enough to do that.

      True, but it doesn't help in the situation where you have a short shell script running - the shell that runs the script has to hash all those directories.

      It just adds to overhead of running a shell script, and that is something I am opposed to on principle. (It's also why I use ash for /bin/sh rather than bash.)

      Now, I believe the truly intelligent shells do not pre-emptively cache your whole path, they just add entries to the cache as needed. Either way, though, having a long path is harmful to performance - and a short-running shell (running a short script, say) is penalised more than a long-running shell due to less use of cache.

      As an aside, I believe the only things that belong in bin dirs are binaries a user or administrator might ever actually want to run. In this regard, I think Debian packages sometimes go overboard - daemons, in my opinion, should go in /usr/lib/{subdir} or something rather than /usr/sbin, since you should really be invoking them via /etc/init.d/* scripts.

      --
      "How can you claim that you are anti-crack, while still writing a window manager?" — Metacity README
    24. Re:The Alternative? by Znork · · Score: 2, Insightful

      Definitely.

      Use. The. Package. Manager.

      If there's one thing that is a total complete pain in the ass with SysV, it is the theory of installing separate applications in /opt. Well, nice and fine when you have /opt/oracle, but when you have about 50 to 100 applications in /opt, not to mention library paths, not to mention having those 2000 symlinks in /usr/local instead, and then keeping track of them or keeping track and managing the paths, library paths, etc, agh... I maintain systems like this every day, and if it wasnt for estoteric things like self contained HA cluster packages I'd throw it all in /usr and be rid of all the grief that clean separation causes.

      If someone wants to go back and do it all manually, go ahead. Hell, compile it all from source and decide exactly where to put everything, but I got over that several years ago and I'll take the rpm managed stuff in /usr/bin _please_ and my own compiled cruft in /usr/local.

      True, most people wont compile their own, but those most people _SHOULD_ be using the package manager and _nothing_ else to manage their application installation places or they're gonna break'em anyway.

      The virtual separation the package manager provides is enough.

    25. Re:The Alternative? by Malc · · Score: 2

      And the other thing about moving kde bins to their own directory: it makes it easier to run with multiple versions.

    26. Re:The Alternative? by SlickMickTrick · · Score: 3, Informative

      SuSe actuallly does this. On my /opt path I have:

      /opt/kde
      /opt/kde2
      /opt/gnome

      And they have bin directories under that. Funny, until now I've only ever heard people slam SuSe for doing it (something about not being Linux Standard Base compliant).

      I personally like it. The only thing, whenever you compile a kde program, you add --prefix=/opt/kde2 to the ./configure command.

    27. Re:The Alternative? by staeci · · Score: 2, Insightful

      "I'd much rather have 2000 binaries in /usr/bin than 2000 path entries in my $PATH"

      Who the hell moderated that as insightful?

      how about:

      /usr/bin
      /usr/games/
      /usr/gnome/bin
      /usr/kde/bin
      /usr/java/bin
      /usr/adobe/bin
      /usr/netscape/bin
      /usr/mozilla/bin
      /usr/real/bin

      Was that so hard. It would work for me. Most program with more than just an executable gets a subdir. Suddenly it would be possible to wander around in the directories without ls scrolling off the screen.

      And all the related files which seem to live in /usr/share like all the kde config directories can go in /usr/kde too.

      And as far as just use a package-manager... there is no point in using one tool to avoid a problem - the problem is still there. Package-managers solve the problem of package dependencies, not messy filesystems.

      --
      'Welcome to Rivendell, Mr. Anderson...'
    28. Re:The Alternative? by BrookHarty · · Score: 2

      There still is a cache bug in ksh on solaris upto solaris 8, the damn shell wont see the a program even if you path it. When it does happen its when a child sub shell installs the file /usr/local/bin (normally) and the parent doesnt see it. It happens rarely, but ive stumped many of a sys-admin letting them try to run a file and see "File not found type errors"

  4. better command path system? by TechnoVooDooDaddy · · Score: 3, Insightful

    imo, we need a better command path system thingy that allows easier categorization of executables and other stuff... Win32 has the System32 (or System) directory, *nix has /usr/bin, /usr/share/bin, /usr/local/bin etc...

    I don't have a solution, but i'll devote a few idle cycles to it...

    1. Re:better command path system? by Segfault+11 · · Score: 2

      Binaries have gone into COMMAND or SYSTEM32 for ages. It's where small Windows support programs (SYSEDIT, MSCONFIG, etc.), and MS-DOS console apps like XCOPY live:

      C:\WINDOWS\COMMAND (9x)
      C:\WINNT\SYSTEM32 (NT)

      --

      I registered my hate for Jon Katz

    2. Re:better command path system? by snake_dad · · Score: 2
      c:\windows\system...

      oh yes, this is the way to go. Hundreds of applications, each storing different versions of the same needed system or application dll's in one dir, overwriting the one version that worked....
      </sarcasm>

      There is a reason that binaries are spread over different partitions on Real Operating Systems....

      btw, it's nice to see that html-formatting is actually making sense in my first line..: <br><br> :-)

      --
      karma capped .sig seeking available Slashdot poster for long-term relationship.
    3. Re:better command path system? by mendepie · · Score: 3, Insightful

      What we need is a *limited* way to have a single $PATH definition that will address arbitrary packages. I was thinking about

      PATH="$PATH /opt/*/bin"

      This would look in /opt once and cache the dirread so the hit for this only happens once.

      Of course this adds the problem of ordering (/opt/a/bin/foo vs. /opt/b/bin/foo).

      --

      Are you paranoid if you know that they just want to know everything you say and do?

  5. he's pretty far off base by kaisyain · · Score: 5, Interesting

    Anyone who claims that RedHat started the use of /usr/bin/ as a dumping ground can't be taken seriously. Pretty sure slackware and SLS did the same thing. Same goes for Solaris, AIX, AUX, Sun/OS, Irix, and HPUX.

    It's not about lazy distributors. It's about administrators who are used to doing things this way and distributors going along with tradition.

    1. Re:he's pretty far off base by the_2nd_coming · · Score: 2, Funny

      did you look at HER Site? he is a SHE and from the ooks of it she likes to get freekaaaayyy :-)......pretty damn hot for a geek girl.

      --



      I am the Alpha and the Omega-3
    2. Re:he's pretty far off base by Zocalo · · Score: 2, Funny

      Well, you can get freekaaaayyy if you want, but you might want to read Daniel's about page first... ;)

      --
      UNIX? They're not even circumcised! Savages!
    3. Re:he's pretty far off base by SilLumTao · · Score: 3, Interesting
      Anyone who claims that RedHat started the use of /usr/bin/ as a dumping ground can't be taken seriously. Pretty sure slackware and SLS did the same thing. Same goes for Solaris, AIX, AUX, Sun/OS, Irix, and HPUX.

      Agreed, but does that make it right?

      For the last few years, this is the kind of thing that has really been nagging me. All OSes seem to suffer from the same problem. Why are we so stuck with the mindset that traditions of the past shouldn't be challenged? Can't we, as "brilliant" computer scientist, start solving these problems and move on?

      I recently demo'ed a good Linux distro to a friend and it finally dawned on me. When you load KDE, you are literally overwhelmed with options. My friend asked, "What is the difference between tools and utilities?". I didn't know. I tried to show him StarOffice and it took me a few minuets of digging in different menus.

      No, I don't use Linux on a daily basis, and no, I'm not the smartest person in the world. But I think I see the problem. Everything seems to be an imitation of something else (with more bells and whistles). Where is the true innovation? Our computers and software are not significantly different than they were 20 years ago.

      Why are we still using $PATH?

      --
      "He was a wise man who invented beer." -- Plato
    4. Re:he's pretty far off base by the_2nd_coming · · Score: 2, Funny

      I did ;-) rarooowwww

      --



      I am the Alpha and the Omega-3
    5. Re:he's pretty far off base by Marasmus · · Score: 5, Informative

      You're right - Slackware, Debian, and SuSE (relatively older players in the Linux game than RedHat) did do this heavily in older versions. However, there has been some work in each of these distributions to remedy this. For example, in Slackware 8, all GNOME default-install stuff is in /opt/gnome (which is sensible and clean), all KDE default-install stuff is in /opt/kde (likewise), and contrib packages normally get installed in /usr/local (the semi-official place for things you compile yourself) or /opt (more sensible, since these are still distro packages).

      As far as commercial UNIXes go, they really *are* better organized than the average Linux distribution. I'm speaking mainly from Solaris experience, but BSD/OS and HP/UX also keep a pretty good level of modularity to the filesystem structure.

      RedHat certainly didn't start this fiasco, but then again they haven't been very proactive in fixing these problems either. I can't speak for GNOME or KDE on RedHat (since I only use RedHat for servers without X), but the contrib packages practically all get thrown into /usr and make things a real nightmare to manage. Added atop that dependency conflicts where Program A needs library 2.3.4 while Program B needs library 2.4.5, and the system approaches unmanageable at a very high rate of speed.

      A little more modularity in the file organization department wouldn't hurt us. It could also help the dependency problems if the package maintainers use a more modular file structure to their advantage.

      --
      .... um, i lost you after "0110100001101001".
    6. Re:he's pretty far off base by jafac · · Score: 2

      Well, Macintosh is pretty good (Classic) but every app tries to dump itself on your desktop.

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
  6. I think it is better... by nll8802 · · Score: 5, Insightful

    I think it is better to install all your programs binaries under a subdirectory, then symlink the executables to the /bin /usr/bin or /usr/local/bin directorys. This gives you a lot easier way to remove programs that don't have an uninstall script included, and Is a lot more organized.

    1. Re:I think it is better... by sbeitzel · · Score: 2

      You'd still have to clean up all the symlinks, so you're not really buying yourself anything.

      It's true that having all the files associated with a given package in a single location makes it easy to see what-all you've got and which files belong to which package, but you'll still require something that will clean up all the symlinks that point off to nowhere.

      --
      Oh, go on, check out my job.
    2. Re:I think it is better... by ichimunki · · Score: 3, Insightful

      Yes, but dead symlinks are easy to see (on my system they make an annoying blinking action) and scripts can be written that recurse down the directory tree looking for invalid links. Another positive argument in favor of this approach is that many packages include several binaries, only one or two of which are ever going to be called directly from the command line in a situation where using a full path is not convenient. This also makes version control a lot more obvious (and having simultaneous multiple versions a lot easier, too).

      --
      I do not have a signature
    3. Re:I think it is better... by cpuffer_hammer · · Score: 2

      Could this not be done with some kind of auto mirroring?

      Each application would have its own tree and could have bin, sbin, lib and/or other directories.
      These directories would be marked or registered so that they would appear as if they were part of /bin or /sbin exec... That way we only need a short path but we still maintain application separation.

    4. Re:I think it is better... by Daniel+Serodio · · Score: 5, Informative
      No need to do the dirty work by hand, that's what GNU Stow is for. Quoting from the Debian package's description:
      GNU Stow helps the system administrator organise files under /usr/local/ by allowing each piece of software to be installed in its own tree under /usr/local/stow/, and then using symlinks to create the illusion that all the software is installed in the same place.
    5. Re:I think it is better... by aozilla · · Score: 2

      I'd go one step further. Chroot the programs and hard link the required libraries into the chroot directory. Then you don't have to worry about annoying upgrade problems when one package insists on one set of libraries and another package insists on another. Also, when the hard link count goes down to 1 (the one in the master /lib directory), you can delete the file.

      --
      ok then your [sic] infringing on my copyright! Could you as [sic] me next time before STEALING my comments for your own?
    6. Re:I think it is better... by Zocalo · · Score: 2
      but you'll still require something that will clean up all the symlinks that point off to nowhere.

      A combination of "ls -l", "cut" and grepping for the subfolder you just "rm -rf"'d fed into "rm" perhaps? It shouldn't be too difficult to work out the regexp to sort out the "symlink -> target" bit at the end, but it's late in my day, so I'll leave that as an exercise for the reader... ;)

      --
      UNIX? They're not even circumcised! Savages!
  7. Package Management by Fiznarp · · Score: 4, Insightful

    ...makes this unnecessary. When I can use RPM to verify the purpose and integrity of every binary in /usr/bin, I don't see a need for separating software into a meaningless directory structure.

    DOS put programs in different folders because there was no other way to tell what package the software belonged to.

    1. Re:Package Management by kramerj · · Score: 3, Interesting

      And then you get into naming conflicts down the road.. MS has this problem now, and is dealing with it partly with the new fandangled "Private Packages" or whatever in XP.. Basically unsharing shared libraries.. There DOES need to be separation that can be controlled more than it can be now, or we are going to see problems in the future. Have you ever installed a package and a file was already there? Were they the same file? Do you know? Version? Its a bad idea to clump everything together... what we need is to make a path statement extension, that basically says /usr/bin/*/ to allow everything one directory down, OR, allow packages to register their own paths in their install directories (ie, a file that gets installed and then pointed to to say "search here for executables as well"). Make it an config in /etc that points to these other little files that contain places to look, then at boot time enumerate that all out and make a tree of the executables.. fast and easy to manage..

      Jay

      --
      "What's this script do? unzip ; touch ; finger ; mount ; gasp ; yes ; umount ; sleep Hint for the answer: not everyth
    2. Re:Package Management by tjansen · · Score: 2

      No, you don't. It's the package manager's job do avoid any conflicts. Windows has these problems because each piec of software comes with its own installation program and does not know anything about the others.

    3. Re:Package Management by gowen · · Score: 2
      An example: I have a program in my path called convert. If I query the system where it is located (which convert) I get the reply /usr/bin. This tells me nothing about the function of the program.

      [gowen@orr gowen]$ whatis convert

      convert (1) - converts an input file using one image format to an output file with the same or differing image format.


      What was your point again?
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    4. Re:Package Management by Coplan · · Score: 2, Interesting
      Maybe such a method already exists. But in case it doesn't, it would be nice to be able to integrate such information directly into the ls function (so what if it's a subcommand, doesn't bother me). That way, you can do a list of the directory, and see ON THE FLY what program does what. I imagine that performance might be an issue on large directories...but a database query can't be too processor demanding these days, can it?

      I agree, though. We don't necessarily need to separate programs for the most part. Espeically since the average program in the /usr/bin directory is only one file. But in the case that such a program requires several files (IE: Mozilla), these programs are already separated for the most part. So, it tends to be a non-issue anyhow. Mind you, the only real issue at hand would be the fact that one would have to create a standard for what gets separated, and what doesn't. But again, that's essentially a non-issue as a symbolic link typically takes a programs place within the /usr/bin directory anyhow.

      So nothing new needs to be done.

  8. because unix is unix by TheM0cktor · · Score: 2, Insightful

    in the dark old unixish days whenever you bought a bit of commercial software (remember that? buying? :) it'd install itself into /usr/local/daftname/ or /opt/daftname/ or somewhere. This meant there'd be a huge path variable to manage which was a nightmare. The reason the windows equivalent isn't a problem is that windows is not commandline based - users access peograms through a link in a start menu (gross oversimplification but you get the idea). This simply doesn't translate to the command line paradigm. So a simple answer - nice path variables, neat directory structures, usable command line interfaces, pick any two. ~mocktor

    1. Re:because unix is unix by Malc · · Score: 2

      Windows doesn't have a huge unwieldy path variable, but it does have a huge unwieldy registry, which is a single point of failure and is much harder to recover if problems arise. I can rebuild a path variable by hand, but I shudder at the thought of dealing with all those GUIDs to rebuild the "paths" to all of the COM interfaces/coclasses/typelibs/etc on the system. If you lose your path variable, you can recover fairly easily... if you lose your registry, you normally have to reinstall the OS and all of the apps.

  9. Linux From Scratch by MadCamel · · Score: 4, Interesting

    This is _EXACTLY_ why I use LinuxFromScratch. You do not HAVE to use the package managment system, you can install anything *just* the way *you* want it. X applications in /usr/bin? No way jose! (My appoligies to anyone named Jose, I'm sure you are sick of hearing that one), /usr/X11 it is! If you are not happy with the standards, make your own, it just takes a little time and in-depth knowledge.

    1. Re:Linux From Scratch by gowen · · Score: 2
      You do not HAVE to use the package managment system, you can install anything *just* the way *you* want it.

      In much the same way you can with EVERY OTHER FUCKING DISTRIBRUTION. Package managers are there for those who want them, as and when the want them. Nothing stops you from compiling from source and installing in /usr/bin or /usr/bong or /usr/badda-bing-badda-boom-awopbopaloolopawopbambo om
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  10. Response by uslinux.net · · Score: 3, Insightful
    You have to use the package manager.


    And you should, normally. If you system installs binutils as an RPM, DEB, Sun/HP/SGI package, well, you _should_ use the package manage to upgrade/remove. After all, if you don't, you're going to start breaking your dependencies for other packages. That's why package managers exist!


    In some respects, Linux is better than many commercial unices. SGI uses /usr/freeware for GNU software. Solaris created /opt for "optional" packages (what the hell is an optional package? isn't that what /usr/local is for?!?!) At least all your system software gets installed in /usr/bin (well, unless you're using Caldera, which puts KDE in /opt... go figure), and if you use a package manager like they were intended, it's easy to clean them up. The difference between Windows and Linux/Unix is that the Linux/Unix package managers ARE SMART ENOUGH not to remove shared libraries unless NOTHING ELSE IS DEPENDING ON THEM! In Windows (and I haven't used it since 98 and NT 4), if you remove a package and there's a shared library (DLL), you have the option of removing it or leaving it - but you never KNOW if you can safely remove it, overwrite it, etc.


    I agree that there should be a new, standard directory structure, but I disagree that every package in the world should have its own directory. If you're using a decent package manager, included with ANY distro or commercial/free Unix variant, there's little need to do so.

    1. Re:Response by brunes69 · · Score: 3, Insightful

      Ok, we all hate windows, but spreading FUD is useless, and makes you look as bad as they do. Every windows app I have _EVER_ uninstalled (and there has been alot!) _ALWAYS_ says something along the lines of "This is a shared DLL. The registry indicates no other programs are using it. I will delete it now unless you say otherwise". This sounds pretty much like it knows whats being used and what isn't. Unless you get your registry corrupted, which wouldn't be any different from having your package database (RPM or dpkg) corrupted.

    2. Re:Response by brunes69 · · Score: 2

      At least it asks you. I've had more than one occasion when rpm -e <packagename> has left me with a diferent program being unable to run, and RPM never even warned me, or asked me what shared libraries it could delete.

    3. Re:Response by sfe_software · · Score: 3, Interesting

      I agree, Windows isn't the problem in the case of DLLs. It really is stupid for an uninstall routine to ask the user whether to delete a DLL. It seems it should either know that it's not needed by any other program, or leave it alone. Asking the user (and really think about your typical Windows user) about deleting system files is a mistake. I've walked more friends and family through reinstalls after having uninstalled crappy shareware...

      Unfortunately this practice is common thanks to InstallShield being used by so many programs, as InstallShield always asks before deleting a so-called "shared" DLL. Keep in mind, half of the time the DLL is program-specific (ie not shared), and other times it's something the program itself did not install in the first place (was already there). I don't think Windows itself is to blame here...

      Win2k still suffers from this, but if you do delete a DLL it almost always magically reappears. It's part of some scheme to protect the system from its users I believe, but it is a real pain when you actually want to remove a DLL...

      As for the Unix side, I've always wondered about the organisation (or lack thereof) of programs. Many tools do IMO belong in central locations (cat, grep, ls...) but anything larger should have its own directory. I long for the day when I can say:

      export PATH=$PATH:/usr/programs/*/bin

      or something to that effect...

      Most of your larger packages do attempt to install into their own locations; Apache by default ends up with /usr/local/apache/* though it does tend to scatter a few things around. MySQL, Qmail, and a few others generally create subdirectories for most of their files. Not perfect, but it's a step in the right direction anyway.

      I personally hate RPM, and I generally snag a tarball over an .rpm any day. I do like *BSD's ports collection quite a bit, but on RedHat RPM is about the best we've got. RPM is fine for the initial install, and even for adding some system-level tools/packages/upgrades, but any major software instalation after that I prefer to install manually; and of course, this doesn't help the issue at hand one bit...

      Unfortunately, I have my complaints about filesystem standards, but I don't have any solutions either, really. Too much software exists that depends upon our current system, though a proposed future standard might be nice. Maybe a new POSIX recommendation is in order... and once some years go by, software vendors will slowly migrate to the new standard... of course I don't know what that standard might be...

      --
      NGWave - Fast Sound Editor for Windows
  11. hmmmm.... by Ender+Ryan · · Score: 3, Informative
    My /usr/bin has ~1,500 files in it. A whole bunch of it is gnome stuff, because Slack 7.1 didn't put gnome in a completely separate dir. But then there is also all kinds of crap that I have absolutely no clue what it does. Just looking at some of the filenames I think I know what they are for, but I have other utilities on my machine that do the same thing.

    So, I'd say yes, it probably is partly because of lazy distro package management, but then again some people might still use some of this stuff and expect it to be there.

    On most new distrubutions I've see this is actually getting better. The latest Slack at least completely separates gnome by putting it in /opt/gnome.

    In any case though, I think there are more important things to worry about, such as all-purpose configuration tools, or at least lump them all together into a graphical management tool. You should be able to configure everything from sound/video to printers all in the same place.

    --
    Sticking feathers up your butt does not make you a chicken - Tyler Durden
  12. the BeOS filesystem by codexus · · Score: 5, Insightful

    The database-like features of attributes/index of the BeOS filesystem could be an interesting solution to the problem of the PATH variable.

    BeOS keeps a record of all executables files on the disk and is able to find which one to use to open a specific file type. You don't have to register it with the system or anything, if it's on the disk it will be found. That makes it easy to install BeOS applications in their own directories. However, BeOS doesn't use this system to replace the PATH variable in the shell but one could imagine a system that does just that.

    --
    True warriors use the Klingon Google
  13. Everyone's guilty, noone has a solution. by Haeleth · · Score: 3, Insightful

    This is somewhat parallel to the situation common in Windows, where every new application tries to place its shortcuts in a separate folder off Start Menu/Programs. It's common to see start menus that take up two screens or more, whereas everything could be found much faster if properly categorised. MS made things worse in Win98 by having the menu nonalphabetical by default.

    Limiting bad organisation to Red Hat is silly. The only Linux distros I've tried are Red Hat and Mandrake, both of which are equally poor in this regard. Nor, I have to say, does the FSS make it any easier to organise a hard drive properly. Is the /usr/local distinction useful, for example? Wouldn't it make more sense to have a setup like /usr/apps, /usr/utils, /usr/games, /usr/wm, and so on - to categorise items by their function, rather than by who compiled them?

    The whole /home thing is equally confusing to a Windows migrant. Yes, *nix is a multi-user OS. But is that a useful feature for the majority of home users? Providing irrelevant directories is a sure-fire way to confusion.

    It's impossible to have a perfectly organised hard disk, of course. You can't fight entropy.

  14. Ah, yes... by Corgha · · Score: 5, Funny

    /opt/LINWgrep/bin/grep
    /opt/LINWsed/bin/sed
    /opt/LINWdate/bin/date....

    1. Re:Ah, yes... by Arethan · · Score: 2

      LMAO!
      Someone obviously uses Solaris... ;)

  15. Re:The Alternative? No Alternative! by CrazySecurityGuy · · Score: 2, Interesting

    Uh huh. And when something goes terribly wrong, how do you determine what went wrong? Our production servers (HPUX, Solaris, AIX) have in the /usr/* only what the system supplied. Everything else gets put in it's "proper place"- either /opt/, or /usr/local/ (it's own filesystem) or similar. The paths are not so bad- and the system is healty and clean. The alternative? A system easily attacked with a trojan horse.

  16. Why? by DaveBarr · · Score: 5, Insightful

    The one thing this guy fails to answer is "why is it bad that I have 2000 files in /usr/bin?". There are no tangible benefits I can see to splitting things up, other than perhaps a mild performance gain, and satisfying someone's overeager sense of order.

    Failing to answer that, I think his whole discussion is pointless.

    Blaming it on lazyness on not wanting to muck with PATH is wrong. Managing your PATH is a real issue, something an administrator with any experience should understand. In the bad old days we came up with ludicrious schemes that people would run in their dot files to manage user's PATH. I'm glad those days are over. Not having to worry about PATH is a tangible benefit. Forcing package mantainers to use a clear and concise standard on where to put programs is a tangible benefit.

    Perhaps I'm biased because these past many years I've always worked with operating systems (Solaris, Debian, *BSD) that have package management systems. I don't care where they get installed, as long as when I install the package and type the command it runs. This is a Good Thing.

    1. Re:Why? by hexix · · Score: 3, Insightful

      Windows doesn't have package management, that's why you have those problems on windows. Comparing RPM, DPKG, etc to the uninstall programs in windows just doesn't work.

      RPM and DPKG know every single file that was installed, and will remove every single file that was installed. And it actually keeps a database of dependencies so it won't let you uninstall a program if another program depends on it.

      In the windows world, a program has the option of having an uninstall available. But from what I can tell it's really just a cheesy hack to get uninstall features without going through the work to setup a nice package manager. It seems to just have a list of the files it supposively installed and then mark some as shared and then uninstall the programs and ask the user if they want to uninstall the shared files, with no knowledge of whether or not they're being used by other programs.

      That's why we don't need subdirectories for programs. Although it probably wouldn't be a bad thing because it would help people find global config files and stuff for programs. But really, if you know how to use RPM and DPKG there isn't a need, as you can ask it what the files are that belong to a program and other things.

    2. Re:Why? by dillon_rinker · · Score: 2

      So...a hierarchical file structure under usr is pointless. Why then have ANY hierarchical file structure at all? Why not have one big directory? There is no reason you can come up with that doesn't counter your own arguemnt against a hierarchical structure under usr.

    3. Re:Why? by gowen · · Score: 2
      So...a hierarchical file structure under usr is pointless.
      Putting executables together in /usr/bin and support files in /usr/share/package/ is a hierarchial structure. And one I like. I never think about where my program files are, rpm || apt-get means it just works. What is the problem?
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    4. Re:Why? by roystgnr · · Score: 2

      And what happens when your package database gets corrupted?

      I would restore it from a backup, just as if a directory in my filesystem got corrupted or if my hard drive fried. However, I installed Red Hat 4.1 in 1997, and have upgraded through 4.2, 5.0, 5.1, 5.2, 6.1, 6.2, 7.0, 7.1, and 7.2 (without reinstalling) in the meantime, and I've never had either failure occur.

      What was your point again?

    5. Re:Why? by dillon_rinker · · Score: 3, Interesting

      The problem is when it DOESN'T just work.

      You could theoretically (and actually, too, since you've got the sources :) glom ALL your files together in / with no problem. When you mount another file system, all the files within that system are added to the pile in /. Why not do that? Because there are benefits to a hierarchical file structure. There are benefits to hierarchies at every level, though it is possible to take it to an extreme.

      If everything works, there's actually no problem in glomming everything together in /. The problem is when something breaks and a HUMAN BEING has to analyze what's on the system. This is less of a problem on hackers' personal systems, used and administered by solitary individuals at their own whim, than it is on a business server, used and administered by many. You want as much as possible of your system to be obvious to human eyeballs when most everything on the system is broken.

      This, BTW, is why I am fundamentally morally opposed to binary storage of configuration data (a la the win32 registry) versus plain-text storage. Binary is easier for the computer to handle, which is great as long as things work. Plain text is easier for me to handle, which is useful only when things break. Since the computer can work with either, plain text is preferable.

      When things break, I must have the ability to go from zero knowledge about a broken system's configuration to a fully functional system as quickly as possible. Well-organized files that take full advantage of a hierarchical file structure, and plain-text config files, are much helpful in this situation.

      (It just occurred to me that referring to the root directory as "/" at the end of a sentence produces an ambigous symbol; suffice to say I don't mean slashdot.org by "/.")

      IF everything always worked, there would be no advantage to . You could eliminate the path statem

    6. Re:Why? by dillon_rinker · · Score: 2

      Right. And everybody has heard of someone else's grampa or uncle who smoked three packs a day and drank a quart of whiskey and died at the ripe old age of 103.

      In other words, anecdotal evidence is pointless. No matter how overwhelming the evidence against some behavior might be, the bell curve practically guarantees that some people will be able to engage in that behavior and get away with it.

    7. Re:Why? by jafac · · Score: 2

      What do you call Microsoft Installer (MSI) or Add/Remove Programs?

      Of course, the only guaranteed way to get a system into it's last known working state is to fdisk and reinstall the OS. That's par for the course in the wonderful world of Windows, because "uninstall" doesn't REALLY uninstall everything.

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
    8. Re:Why? by roystgnr · · Score: 2

      So, you backup everything each time you install a new package, do you ? (Because if you don't, you'll loose track of some of your /usr/bin files)

      Why would I frequently back up files I already have a pristine source of? Those new /usr/bin/ files came from some package, and can be restored by reinstalling the same package. I back up /usr/local/, /etc/, /home/, /var/, and "rpm -qa". Maybe I'm missing something and this is going to bite me in the ass when I restore, but like I said, I've never had the chance to find out.

      And you pretend you have a clean structure of your redhat and never got the need to fix things by hands after 8 updates ?

      8 version updates, passing through at least 4 hard drives, 5 motherboards, and far, far too many Windows reinstalls.

      And I've never had to fix anything by hand after an official upgrade. I installed a broken version of RPM itself from Rawhide once, and having to use a binary tarball to regress to the previous one, but the database wasn't lost. And I seem to remember having to run "rpm --rebuilddb" once, but I don't remember why.

      Stop kidding people, your post is not beleivable.

      Oh, no, Anonymous Coward is lecturing me on internet credibility! How shall I ever recover?

    9. Re:Why? by Ben+Hutchings · · Score: 2

      The "Add/Remove Programs" control panel is just a pretty interface to uninstall programs (listed in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Uninstall). There's no central tracking of file usage. Any intelligence has to be implemented by each uninstall program. Windows Installer appears to be a bit smarter, but I don't think it has anything like the all-knowing databases that rpm and dpkg use.

  17. Use /usr/local for add-ons, keep /usr clean by Baki · · Score: 4, Interesting

    ~> ls /usr/bin | wc -l
    403
    ~> ls /bin | wc -l
    36
    ~> ls /sbin | wc -l
    91
    ~> ls /usr/sbin | wc -l
    220
    ~> ls /usr/local/bin | wc -l
    796

    This is FreeBSD, which installs a relatively clean OS under /usr and puts all extra stuff in /usr/local (sometimes the executable is in /usr/local/bin, sometimes in /usr/local//bin).

    I like that much more, it is the old UNIX way to separate the essential OS from optional stuff. It really is a pity that most Linux distro's dump everything directly in /usr.

    As for my slackware, I installed only the minimum, and roll my own packages for everything I consider not to be 'core Linux'; all these packages go under /usr/local. It can be done, and keeps things tidy and clean.

  18. Have a directory standard for applications. by MongooseCN · · Score: 2

    Have a standard directory structure for every application. Put all the applications in /opt then require every application to have the subdirectory /bin so if you want to find the binaries of all applications you look through all the /opt/[app name]/bin directories. You could also have other dirs like /opt/[app name]/lib for libraries, etc... You don't need to know the specific name of each application to search all the /bin dirs, you just open /opt and get a list of the directories, then append /bin to all the names and try and open those, then search in those for the binaries.

    This keeps all the application files in one directory. If you want to remove an application, you just rm -rf that one directory. Upgrading applications is much simpler since you just point to that one dir and put the files there. You can also have multiple versions of an application installed just by renaming their root directory.

    Applications shouldn't spread themselves all over the system, they should be placed in one spot with a specific directory structure and be moduler to the rest of the system.

  19. Tradeoffs/union fs by apilosov · · Score: 2, Insightful

    Here, the tradeoff is being able to quickly determine the files belonging to a particular package/software vs time spent managing PATH/LD_LIBRARY_PATH and all sorts of other entries.

    Also, the question is how should the files be arranged? By type (bin, share/bin, lib, etc) or by package?

    In Linux (redhat/FSSTD), the emphasis was placed on arranging files by type, and the file management was declared a separate problem with rpm (or other package managers) as a solution.

    There is another solution which combines best points of each:

    Install each package under /opt/packagename. Then, use unionfs to join all /opt/packagename's under /usr tree. Thus, you still will be able to figure out which package has which files without using any package manager, but at same time, you are provided unified view of all packages installed.

    Unfortunately, unionfs never worked on linux, and on other operating systems its very tricky. (Such as, how do you ensure that underlying directories will not have files with same name? And if they do, which one will be visible? What do you do when a file is deleted? etc).

  20. Translucent file system by Pseudonym · · Score: 5, Interesting

    Even better would be if Linux had a translucent file system. Simply mount all the path directories on top of each other and let the OS do the rest.

    For the uninitiated, a translucent file system lets you mount one filesystem on top of another filesystem, the idea being that if you tried to open a file the OS would first search the top filesystem, then the bottom one. In conjunction with non-root mounting of filesystems (e.g. in the Hurd) it removes the need for $PATH because you can just mount all the relevant directories on top of each other.

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    1. Re:Translucent file system by brunes69 · · Score: 3, Funny

      Wait until KDE 3 / Gnome 2 com out with Xrender suport, and we can all have translucent filesystems!

      HAR HAR!

    2. Re:Translucent file system by DGolden · · Score: 2, Informative

      HURD, and AmigaOS ahd a similar system called "assignments".

      --
      Choice of masters is not freedom.
    3. Re:Translucent file system by Just+Some+Guy · · Score: 5, Interesting

      FreeBSD comes with something called a union filesystem that is exactly what the poster described. From man (8) mount_union:

      DESCRIPTION
      The mount_union command attaches directory above uniondir in such a way
      that the contents of both directory trees remain visible. By default,
      directory becomes the upper layer and uniondir becomes the lower layer.

      Non-FreeBSD users can read an online version.

      --
      Dewey, what part of this looks like authorities should be involved?
    4. Re:Translucent file system by Just+Some+Guy · · Score: 2
      The AmigaOS assign system allowed one "volume name" to refer to any number of directories, which would be searched in order until a matching filename was found. For example, if MYCUSTOMPATH: was defined as

      • /bin
      • /sbin
      • /usr/bin
      • /usr/sbin
      • /usr/local/bin
      • /usr/local/sbin


      (well, the Amiga equivalent of those directories, at least), and you tried to execute MYCUSTOMPATH:foo, then it would execute the first 'foo' it found in one of those directories.

      The above would be emulated in Unix by setting the $PATH variable. However, AmigaOS would allow you to use the assign system for non-executable files as well; it was a global system. You could have your fonts spread across SYS:FONTS, User:Fonts, APP1:Fonts, App2:myFonts, app3:fontstuff. A lookup for FONTS:helvetica.font would get a file from any of those directories.

      Still, though, it isn't really similar to what the poster was asking for, although it was a very handy tool.
      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:Translucent file system by mattdm · · Score: 3, Interesting

      Yes, plan 9 pretty much revolves around this idea.

      It's my impression that recent developments in the Linux kernel (along with bind mounts, etc.) are moving towards making this easy to implement.

    6. Re:Translucent file system by mattdm · · Score: 3, Informative
      Check it out (from: http://www.fywss.com/plan9/intro.html):


      Plan 9 has "union directories" : directories made of several directories all bound to the same name. The directories making up a union directory are ordered in a list. When the bindings are made (see bind (1)), flags specify whether a made (see bind (1)), flags specify whether a newly bound member goes at the head or the tail of the list or completely replaces the list. To look up a name in a union directory, each member directory is searched in list order until the name is found. A bind flag specifies whether file creation is allowed in a member directory: a file created in the union directory goes in the first member directory in list order that allows creation, if any.

    7. Re:Translucent file system by mattdm · · Score: 3, Interesting
      Also see the plan 9 "rc" shell docs:


      Extensive use of the $path variable is discouraged in Plan 9. Instead, use the default (. /bin) and bind what you need into /bin.
    8. Re:Translucent file system by armb · · Score: 2

      > well the above sounds nice but it also sounds like a mess ... different types of data are all neatly partitioned

      That's why the Amiga has FONTS: LIBS: and so on.
      LIBS: does the same sort of thing as LD_LIBRARY_PATH, but "dir FONTS:" works transparently, and "ls $LD_LIBRARY_PATH" doesn't.

      Union filesystems don't do exactly the same thing, because different Amiga processes could have different assigns (just as different Unix processes can have different PATH, LD_LIBRARY_PATH, etc.). Apollo allowed environment variables in the filesystem, so e.g. /bin was a symlink to either /sysv/bin or /bsd/bin depending on your environment (the default main system lived in /cmd, but it had fairly good Unix emulation), and you might be able to combine that idea with the union system.

      --
      rant
    9. Re:Translucent file system by DrSkwid · · Score: 3, Informative

      yes, that's exactly how it works

      instead of a really long $path you just have

      PATH=/bin

      and then in termrc (for example)

      bind /bin/$CPUTYPE /bin # cpu specific exes
      bind /usr/$user/bin/bin /bin # my exes
      bind /usr/$user/bin/rc /bin # my shell scripts
      bind /usr/someapp/bin /bin # some app I want

      the namespace is built on a per process group basis so I can pick and choose the exes ()or anything else) on a per process basis

      To compile a program with the C library from July 16, 1992:

      %mount /srv/boot /n/dump dump
      %bind /n/dump/1992/0716/mips/lib/libc.a /mips/lib/libc.a
      %mk

      you can have a different set of libs per window
      (or run the windowmanager INSIDE one of it's own windows and set one namespace for that whole group)

      plan9 has no symlinks

      because "everything is a file" this even works for remote servers & network stacks.

      import helix /net
      telnet tcp!ai.mit.edu

      more

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    10. Re:Translucent file system by Ben+Hutchings · · Score: 2

      This feature doesn't work perfectly. "dir FONTS:" may work, but if you try to Lock("FONTS:",SHARED_LOCK) you'll just get a lock on the first directory in the list rather than on the union of the directories.

  21. I wish unix had this... by Steve+Mitchell · · Score: 3, Interesting

    I wish Unix/Linux had a mechanism where a directory could be marked executable and executing the directory whould internally call some default dot file (such as .name_of_directory)within the directory, and some environmental variable (like $THIS_PATH) was set to the directory and passed to the application process.

    Maintance for applications like these whould be a no-brainer. Just move the directory and all the associated preference files and whatnot travel with the app.

    -Steve

    --
    -- Making computers see, hear, and think... http://www.componica.com/
    1. Re:I wish unix had this... by SCHecklerX · · Score: 2
      There is such a thing for your GUI:

      Rox Filer

      It has the concept of "application directories" Within them are a file for an icon, a file for the application, a directory for help, and a file for the fly-out menu for the app. Good stuff.

    2. Re:I wish unix had this... by S.+Allen · · Score: 2

      Mac OS X does this. Just rename a directory wth the ".app" extension and it becomes executable. There is an expected heirarchy underneath a ".app" directory for resources, libraries, icons, etc but it's pretty straightforward.

    3. Re:I wish unix had this... by spitzak · · Score: 2
      This is exactly what is needed. It would eliminate all the crap with packages and maintenence.

      My recommendation is that the inner file have a fixed name like "main" or something like that so that the directory can be renamed without breaking the app. And instead of $THIS_PATH, the rule is to make argv[0] be the fully expanded path of the directory. This directory should also be automatically added to the front of $LD_LIBRARY_PATH and any similar paths for the running program.

      If you want to put the directory on another disk, you can use a symbolic link to point at it.

      NeXTStep and OSX do something like this, but both use an ".app" extension on the directory name, which I think is stupid.

      Another useful thing to do, but possibly requiring massive work, is change the runtime libraries so that opening a directory and reading it returns the results of "tar" on that directory, and attempting to write such data produces a directory. This will make cp and all other programs handle directory trees transparently.

  22. Related to yesterday's story by vrt3 · · Score: 5, Interesting

    I think the fundamental problem here is related to yesterday's story about new user interfaces. It's a problem of how and where storing our files. Regarding applicationsn, there are two ways to do it: you can store all files (binaries, config files, man pages, etc.) of the same application in the same directory, or you can store all files of the same type from different applications in their respective directories (all config files in /etc, man pages in /usr/share/man (I think), etc.).

    Both approaches have their advantages. The problem with hierarchical file systems is that we have to choose one of them. I would love to see a storage system where we can use both ways _at the same time_. A system that groups file depending on relationships they have. Such that 'ls /etc' gives me all config files for all apps, and 'ls /usr/local/mutt' shows me all mutt-related files, including it's config file(s).

    I have no idea how to implement such a beast. I'm thinking about a RDBMS with indices on 'filetype' and 'application', but I would love to see something much more flexible. All pictures should be accessible under ~/pictures and subdirectories, all files relating to my vacation last year in ~/summer2000. Files relating to both should be in ~/pictures/summer2000 _and_ ~/summer2000/pictures.

    To a certain extent, this can be done via symlinks, but it should be much easier to deal with. You shouldn't have much manual work

    --
    This sig under construction. Please check back later.
    1. Re:Related to yesterday's story by Twylite · · Score: 2

      Isn't this what symbolic links are for...?

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    2. Re:Related to yesterday's story by cpt+kangarooski · · Score: 2

      Yes -- provided that your system automagically creates those symlinks. Doing so manually is a waste of time.

      This is another incarnation of 'Bins' as developed by Alan Kay, IIRC, when he was at Apple, and which showed up to an extent in BeOS. I don't have time to fully discuss it here, but look up his article in Brenda Laurel's "The Art of Human Computer Interface" book. Essentially imagine having folders in the fs that are actually displaying search results as symlinks rather than files expressly placed in there. (e.g. if a folder were "*.mp3" and automatically had symlinks to all matching files)

      --
      -- This and all my posts are in the public domain. I am a lawyer. I am not your lawyer, and this is not legal advice.
    3. Re:Related to yesterday's story by benwb · · Score: 2

      Microsoft Exchange can actually do this. When accessing it through WEBDAV, you can create what ms refers to as search folders, which are basically cached, dynamically updated searches. Issue a propfind with a depth of 1 against these folders and you'll get the result of a search. Unfortunately exchange breaks down when you get up to about 250 of them.

    4. Re:Related to yesterday's story by droleary · · Score: 5, Interesting

      I think the fundamental problem here is related to yesterday's story about new user interfaces [slashdot.org]. It's a problem of how and where storing our files.

      You could also trace it back to the hierarchical database article, which is when I started making a lot of posts on the subject. It seems there is finally a lot of interest being generated about this sort of thing.

      I have no idea how to implement such a beast. I'm thinking about a RDBMS with indices on 'filetype' and 'application', but I would love to see something much more flexible. All pictures should be accessible under ~/pictures and subdirectories, all files relating to my vacation last year in ~/summer2000. Files relating to both should be in ~/pictures/summer2000 _and_ ~/summer2000/pictures.

      This is exactly the sort of thing I'm doing with my Meta Object Manager (MOM) software called Mary. Metadata in the form of attributes and values is associated with each file/object and you can do a query (both textually and graphically) on that metadata. For simple paths like you describe, it is a value query irrespective of a particular attribute, but there is support for a more structured "path" (I actually call it a "focus" as it restricts your focus to a subset of the objects on the system) like /type=picture/location=Hawaii/year=2000. Because the focus items are metadata attributes, order is not significant. With such a system, there are no directories or symbolic links; it's all dynamically structured based on what your metadata focus is at any particular time.

      Mary is just in the alpha stages at this point, but it already works well on the command line for the type of things you describe and I'm using it myself to manage nearly 350,000 objects that have been flowing through my system. I'm not exactly sure when it'll be ready for public consumption, and it'll require a GNUstep port to get working on Linux (I'm doing development on Mac OS X) systems. I was hoping year end, but I don't think I'll have the time. Summer 2002 has a nice ring to it, though. :-)

    5. Re:Related to yesterday's story by Dr.+Evil · · Score: 3, Insightful

      I've been hacking with this idea in my head. It seems to make the most sense. It is a sort-of multidimensional file system, where every file has to be placed in the dimensions in which it belongs. The tree is used only as a single representation of a single dimension.

      There are three reasons I can think for this.

      • Package management (checking out program configs etc. without surfing the whole directory hierarchy)
      • System maintinance (splitting volumes, managing space and performance tweaking)
      • User friendliness!!! ( user's can hit rm -rf and never have to worry about messing anything up! )

      I figure if MS does something like this, it would save them from their drive-letter hell, and solve one of their greatest disadvantages when compared to UNIX... the impact to such a scheme to UNIX would be minimal.

      Database systems would probably be the best place to start looking for methods to do this sort of thing.

  23. Keeping one applications files in one place by tjwhaynes · · Score: 5, Informative

    The unix system doesn't really dump all the files in /usr/bin. These are, almost without exception, executable files. For each executable, support files are usually installed into one or more directory trees, such as /usr/share/executable_name/. The main convenience gained by having all the main binaries in one place (or two - I usually try to leave system binaries in /usr/bin and my own installations in /usr/local/bin) is convenience for searching paths when looking for the binaries.

    However, this paradigm is pretty ugly if you are browsing through your files graphically. It would be nice if each application/package installed into one directory tree, so you could reorganise the system simply by moving applications around. For example,

    /usr/applications/

    /usr/applications/games/

    /usr/applications/games/quake3/

    .. this dir holds all quake 3 files ...

    ...etc..

    /usr/applications/graphics/

    /usr/applications/graphics/gimp/

    ... this dir hold all gimp files

    ...etc...

    If this appeals to you, you might like to check out the ROX project. This sort of directory tree layout was the standard on the Acorn Risc OS and made life extremely easy for GUI organisation. It makes a lot of sense to use the directory tree to categorise the apps and files.

    Cheers,

    Toby Haynes

    --
    Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
  24. RiscOS... by mirko · · Score: 4, Interesting
    In RiscOS, applications are directories which contains several useful files (besides the app binaries, conf or data files):
    • !Sprites[mode] contains the icons to be used with the app and whichever file to be associated with after its filetype
    • !boot which contains directives (associations, globalvariables, etc.) to be executed the first time the Filer window that contain this app is opened (the app is "seen" by the Filer)
    • !run which describes any action to be associated with a double-click on the app icon

    There's also a unique shared modules directory in the System folder.

    This system is at least 10 to 15 years old (not sure Arthur was as modulable, though) and sure proved to be an excellent way to deal with this problem...
    --
    Trolling using another account since 2005.
  25. Um, so? by bugzilla · · Score: 3, Informative

    Much better to have a few thousand files in one dir than to have so many dirs that need to be in your $PATH that some shells will barf.

    For instance, the POSIX standard (I believe) is 1024 characters for $PATH statements. That's a minimum. My users at work sometimes have need for much longer $PATH's. Some OS vendors say, ok, 1024 is the minimum for POSIX compliance, that's what we're doing. Some, like HP-UX (believe it or not) have increased this at user request to 4K.

    In any case, this all seems pretty petty. It's not like our current and future filesystems can't handle it, and package managers are pretty good and know what they put where.

  26. Six of one... by Marx_Mrvelous · · Score: 2, Insightful

    Half a dozen of the other. Of course there are pros/cons to both way; having all executeables in one (or O(1)) location/s makes finding programs also O(1), and a PATH length of O(1). Having one dir/"folder" for each program (or O(X) directories) would then have O(X) search time for a particular program, and O(X) entries in your PATH. On the other hand, finding and deleting entire packages becomes much harder if not all filenames belonging to that package are known. Personally I think it it doesn't matter either way.

    --

    Moderation: Put your hand inside the puppet head!
  27. UNIX is a mess in multiple ways by jilles · · Score: 4, Troll

    This is only part of the problem and characteristic for the way unix has evolved. The whole problem is that there are no standards, just conventions which most unix programmers are only partly aware of. I imagine the whole reason for putting all binaries in a single directory was that you then only have to add one directory to the path variable. In other words because of genuine lazyness you have around 2000 executables in your /usr/bin directory. Of course adding all 2000 programs to the path is not the right solution either (that would be moving the problem rather than solving it). Obviously the path variable itself is not a very scalable solution and needs to be reconsidered.

    To sum it up UNIX programs all have their own sets of parameters, their own semantics for those parameters, their own config files with their own syntax. Generally a program's related files are scattered through out the system. Just making things consistent would hugely improve usability of unix and reduce system administrator training cost. Most of the art of maintaining a unix system goes into memorizing commandline parameters, configuration file locations and syntax and endless man pages. Basically the ideal system administrator is not to bright (after all it is quite simple work), can work very precise, and has memorized every manpage he ever encountered. The not to bright part is essential because otherwise he'll get a good job offer and he'll be gone in no time.

    Here's a sample better solution for the problem (inspired by mac os X packages): give each app its very own directory structure with e.g. the directories bin, man, etc for binaries, documentation and configuration. In the root of each package specify a meta information file (preferably xml based) with information about how to integrate the program with the system (e.g. commands that should be in the path, menu items, etc.). Standardize this format and make sure that the OS automatically integrates the program (i.e. adds the menu items, adds the right binaries to a global path, integrates the documentation with the help system). Of course you can elaborate greatly on these concepts but the result would be that you no longer need package managers except perhaps for assisting with configuration.

    --

    Jilles
    1. Re:UNIX is a mess in multiple ways by jilles · · Score: 2

      I read the thing you linked to, he thinks there's a problem (correct) and he points at a cause (incorrect, IMHO). His solution (standardization) has been suggested before has so far not worked at all.

      I think the real cause is that UNIX was never designed but merely assembled from parts that happened to be available (like hey we need a tool for listing files: lets use ls) or were created on the fly. If people had taken the time to think about how to manage applications properly they would have designed it differently.

      --

      Jilles
    2. Re:UNIX is a mess in multiple ways by BetaJim · · Score: 2, Insightful
      give each app its very own directory structure with e.g. the directories bin, man, etc for binaries, documentation and configuration. In the root of each package specify a meta information file (preferably xml based) with information about how to integrate the program with the system

      I use a tool that does most of those things. Check out encap and the package manager epkg.

      I install most things from source. What I do is specify some prefix during ./configure and have the package installed to say /usr/local/encap/foo-1.2. Then use epkg to sym link everything into the /usr/local/ directories. This makes package upgrades easy and a simple ls shows what is installed. Very handy.

      --

      "Drug related crime" is a misnomer, "prohibition related crime" is the more accurate and correct phrase.

    3. Re:UNIX is a mess in multiple ways by pete-classic · · Score: 2

      All very well said.

      I have one other complaint about the original post. His thesis seems to be "UNIX is inconsistent, whereas Windows, BeOS and MacOS are (each) consistent."

      Uh, NO SHIT. UNIX (in the kleenex sense) is a class of operating systems, with a large number of independent implementations. The others are a single "product" from some company.

      Holy shit.

      In fact, in spite of this distinction, I would say that the standard deviation of UNIXes is smaller than things called "Windows." Much of the apparent consistency in Windows is due to developers going way out of their way to create this appearance. (I.e. Foosoft's Fooware comes on a single CD for Win98 and NT, but it is two distinct builds and an installer that installs the right one without user intervention.)

      Geez.

      -Peter

    4. Re:UNIX is a mess in multiple ways by jilles · · Score: 2

      I don't think I mentioned either BE-OS or windows. I did mention Mac OS X since I consider the way applications are bundled far superior to the inconsistent mess applications are after deployment on linux.

      --

      Jilles
  28. I read this last night... by cthulhubob · · Score: 2, Interesting

    I came away thinking "this man is insane".

    1. He claims DOS had a better way of organizing applications. This is a red herring. I don't want to organize my applications. Ever. I want to organize my data. I don't remember many applications in DOS that were compatible with the same type of data. If there had been, the limitations of the DOS structure would have been readily made apparent. First, CD into the directory where your audio recording utility is and make a .wav file. Then, move the .wav file into the directory where your audio editing utility is and edit it. It works, but why not keep the data in one place and run programs on it as you see fit without regard for their location on your hard drive, and without having a 10-second seek through your PATH variable?

    2. Besides which, DOS had c:\msdos50 (or whichever version you used). That was DOS's variation on /bin. Ever look in that directory and attempt to hand-reduce the number of binaries in it to save disk space? I did. A package management system would have made that doable.

    3. You can have all the localized application directories you want in /usr/local. The point of /usr/local is to hold larger packages which are local to the system. (hmm... /usr/local/games/UnrealTournament, /usr/local/games/Quake3, /usr/local/games/Terminus, /usr/local/games/RT2...) And as a bonus, thanks to the miracle of symbolic links you can have your cake and eat it too - as long as the application knows where the data files are installed you can make a symlink of the binary to /usr/local/bin and run it without editing your PATH variable too! Isn't UNIX grand?

    --

    In post-9/11 America, the CIA interrogates YOU!
  29. Don't install so much stuff! by ivan256 · · Score: 3

    How many of those 1500 binaries do you run, hmm?

    Many distributions install lots of packages you don't need nowadays. Uninstall some, or switch to a more minimalist distribution. Try installing debian with only the base packages. Then whenever you need a program you don't have, apt-get it. It'll make for an annoying few weeks perhaps, but at the end you'll have a system with just what you need on it. I'll bet you will end up with only around 600 binaries in the end (Unless you install gnome... That's like 600 binaries on it's own.)

    What does it matter anyway? If you have 1500 programs it's no better to have them in their own directories then to have them in one place. Also, it's not like you're dealing with all of them at once.

  30. Hierarchy by Waffle+Iron · · Score: 3
    The root problem for all of this seems to be the limits of a hierarchical data organization such as a file system. The debate is if the heirarchy should be organized by application (as the article proposes), file type (all binaries in 'bin'), or some broad attribute of the application ('/usr' vs '/usr/local', 'bin' vs 'sbin').

    There probably is no way to solve all of the issues simultaneously in one hierachical scheme. Symlinks could help because they crosslink the tree. Package managers add a more sophisticated database of relations. These relations are much more useful, but unfortunately are accessible only through the package manager program.

    All in all, though, it seems that organizing by package makes the most intuitive sense, and the helpers like package managers should be responsible for figuring out how to run the app when you type it on the command line.

  31. the problem is deeper by Karmageddon · · Score: 2
    1. package managers should make it easy to move things around. I should be able to install the latest perl-xxx.rpm in a test location, test my scripts against it, and then reinstall it in the canonical place.

    2. this needs to include all the files in /etc so app installers need to support flexible package management. Also note, the #!/shebang is totally broken in this sort of environment.

    3. "the canonical places" (/usr, /etc, etc. :) should be a family of canonical places. The sysadmin group might not want to upgrade their perl scripts at the same time as the dbadmin group. decoupling their interdependency will lead to much more flexibility and quicker overall upgrading.

    4. we can achieve this best if / is no longer / but is instead /root so there could be a /root1 and /root2 . Think of this, one file system containing two different distros that don't wrassle with one another.

    do not evaluate this on whether you think it's a good idea. the point is that software allows soft parameterization, reentrency, soft configuration, etc. So, why can't we have it? Programmers need to stop hard coding shit, binding locations to one place.

    I'd love to upgrade my workstation from RedHat 7.1 to RedHat 7.2 by installing onto the same partition without trashing the old. Then, over the course of the week I could work out the kinks and delete the old, knowing that at any time I could reboot the old to send a fax or whatever. There are 1000s of corporate uses for this type of environment too... how many times have you heard "we're taking the mailserver down to upgrade it overnight" and then heard "um... it didn't come back up..."

    1. Re:the problem is deeper by Zocalo · · Score: 2
      I should be able to install the latest perl-xxx.rpm in a test location, test my scripts against it, and then reinstall it in the canonical place.

      Since you appear to have an .RPM based distro you might want to investitgate the "--relocate==" switch, and possibly "--badreloc" as well, which should enable you to do just what you want.

      --
      UNIX? They're not even circumcised! Savages!
  32. Regarding paths... by mindstrm · · Score: 2

    No.. subdirectories are NOT included.
    The searchapth ($PATH) are just explicit directories.

    I don't see what all the fuss is about though...

    1. Re:Regarding paths... by mindstrm · · Score: 2

      No. It couldn't, as far as I know.
      Shell variables are not eval'd every time they are used.

      But what are you saying? Even if you could do this....

      So if I want to execute 'mozilla' I first have to enter $APP=mozilla, then run 'mozilla'?

    2. Re:Regarding paths... by mindstrm · · Score: 2

      From the command line, you could do such a thing. But that doesn't help a great many other applications that don't necessarily use the shell.

      Also... it's just a huge layer of complexity.. for what? You can achieve the same effect with symlinks if you really don't want to populate /usr/bin with binaries.. just populate it with symlinks.

  33. sounds like Encap by _|()|\| · · Score: 5, Informative
    I think it is better to install all your programs binaries under a subdirectory, then symlink the executables

    You want the Encap package management system. From the FAQ:

    When you install an Encap package, the files are placed in their own subdirectory, usually under /usr/local/encap. For example, if you install GNU sed version 3.02, the following files will be included:
    • /usr/local/encap/sed-3.02/bin/sed
    • /usr/local/encap/sed-3.02/man/man1/sed.1
    Once these files have been installed, the Encap package manager will create the following symlinks:
    • /usr/local/bin/sed -> ../encap/sed-3.02/bin/sed
    • /usr/local/man/man1/sed.1 -> ../../encap/sed-3.02/man/man1/sed.1
    The normal user will have /usr/local/bin in his PATH and /usr/local/man in his MANPATH, so he will not even know that the Encap system is being used.
    The technique is essentially compatible with RPM, but Encap goes so far as to define a package format, which probably is not. If you like RPM, you might do better to simply follow the same convention.
    1. Re:sounds like Encap by jonabbey · · Score: 3, Informative

      There have actually been many, many implementations of this basic idea, each with their own frills and features. I have a comprehensive listing of these programs on our opt_depot page.

      Take a look, if you're interested in that sort of thing.. I can think of relatively few ideas that have been implemented and re-implemented so many times.

  34. Recursive PATH by BoarderPhreak · · Score: 2
    Unless you can set a recursive PATH, I don't think it would be viable to split things into their own directories... Could you imagine how long (and how slow) it would be to have 20, 40, 60 directories or more listed in your PATH?

    With package management software, who cares if it's all in one place? That's fine with me...

    Besides, anything *I* add to the system, depending, usually ends up in /usr/local - which is a further distinction.

  35. KDE binaries in /usr/bin by Captain+Zion · · Score: 2
    Having KDE binaries in /usr/bin completely destroys the possibility of simultaneouly having KDE 2.x and KDE 3 on the same system (say, a server with dozens of users where you want to slowly migrate from one environment to another). Having them on /usr/kde2 and /usr/kde3, or even /opt, sounds much more saner to me. (Shared resources may stay at a common place, but it's up to the upstream maintainers to allow these "shared resources" work as expected.)

    One workaround to remain LSB-compliant and still having them separated would be throwing them on /usr/lib/kde2 and /usr/lib/kde3 -- but it's an ugly hack. But so is arbitrarily breaking the standard and placing them in the correct place. Ugh.

  36. So, what's the reason to do this again? by Ranalou · · Score: 2, Informative

    To pick nits a touch, the reason X got its own sub directory was that it was often on a separate file system from the rest of /usr. In the long, long ago X was of such astounding size relative to the limited and expensive disk space of the day that special considerations had to be made upon its installation. It had little to do with any other sort of organization.

    As for the rest of the rant, to simply call the current practice of file organization horrendous behavior, sloppiness, or laziness without ample argument or demonstrable advantages as to why breaking every package into separate sub directories is damaging to the cause at best. Had the rant contained any sort of claim that there are an unacceptable number of name space clashes, that simply doing an 'ls' in one of these directories blew away the file name cache mechanisms in the kernel, forever making certain optimizations useless, or anything of that sort would hold more weight than unsupported bashing.

    The author laments the inability to manage these subdirectories effectively with standard tools, but as I see it, the option to not use package management has been there all along. Roll your own, putting things where you want them. Or, I might suggest broadening the concept of 'standard tools' to include the package management system installed, should the former option seem ludicrous.

    Not having to muck around with the PATH - and moreso, not having to support users mucking around with their own PATHs - far outweighs the disadvantages of not being able to use 'standard tools'. What time I lose learning and using my package management system I make up tenfold in not supporting the very issues which I forsee the author's solution creating.

    --Rana

  37. wolfenstein test does it right! by austad · · Score: 2

    Last night, when I installed the Wolfenstein test, it put it all under /usr/local/games/wolf and made symlinks to /usr/bin for the executables. I wish more apps did that.

    Imagine every app installed on your machine did this... so much more manageable....

    --
    Need Free Juniper/NetScreen Support? JuniperForum
  38. FreeBSD by sirket · · Score: 4, Interesting

    The file systems on a Unix system make a lot of sense, when people use them correctly.

    /bin for binaries needed to boot a corrupted system.

    /sbin for system binaries needed to boot a system.

    /usr/bin for userland binaries installed with the base system.

    /usr/sbin for system binaries installed with the base system. The are not programs required to boot the system.

    /usr/local/bin for locally installed user binaries such as minicom, mutt, or bitchx.

    /usr/local/sbin for locally installed system binaries such as apache.

    Large locally installed programs such as Word Perfect get installed in a sub directory of /usr/local but they put a single executable in /usr/local/bin so that you do not need to change your path.

    FreeBSD has only about 400 programs in a complete /usr/bin. Other programs are spread about the file system in sensible locations or are user installed. Possibly the only directory that does not make a whole lot of sense is /usr/libexec (where most of the internet daemons are kept).

    -sirket

  39. My take. by mindstrm · · Score: 2

    Well...looking at my Debian system...
    /sbin contains stuff that requires superuser priveleges. Stuff specific to maintaining the hardware, etc.

    /bin contains solid, standard system binaries need to work (bash, grep, chmod, z-tools, gzip, etc). Stuff that you basically need.

    /usr/bin/ contains... userland stuff. software installed/removed for general use.. I don't know the right way to describe it.

    /usr/local/bin.. contains nothing. This is where, generally, I choose to put things I compile myself, so as not to confuse the package management system.

    If we look at ,say, systems where many things are mounted over nfs.. /usr/bin is one of these. /usr/local/bin is for things local to your machine.

  40. /usr/bin for different OSen by TilJ · · Score: 2, Informative

    On a Secure Computing Sidewinder (BSD based):
    % ls -l /usr/bin | wc -l
    258

    On an OpenBSD 2.8 server, minimal install + gcc stuff:
    $ ls -l /usr/bin | wc -l
    344

    On an OpenBSD 2.8 server, full install (including X):
    $ ls -l /usr/bin | wc -l
    373

    On a Mandrake 8.0 server:
    $ ls -l /usr/bin | wc -l
    1136

    On a RedHat 7.1 system with a fairly typical installation:
    $ ls -l /usr/bin | wc -l
    2203

    I want /opt (with subdir's per app) back ;-)

    It seems to mean that there's a lot of overlap/duplication in the tool set on Linux distributions versus the centralized managed BSD distributions. A crowded /usr/bin might be a consequence of the "choice is good" Linux philosophy.

    Not that I'm saying I disagree with "choice is good" ...

    --
    "The purpose of argument is to change the nature of truth." -- Bene Gesserit Precept
  41. How to handle PATH... by kune · · Score: 3, Interesting

    From my .zshenv, works in .profile too. Could be used also for other path variables. Works for all Operating Systems with a reasonable Bourne Shell.

    export PATH

    reset_path() {
    NPATH=''
    }

    set_path() {
    if [ -d "$1" ]; then
    if [ -n "$NPATH" ]; then
    NPATH="$NPATH:$1"
    else
    NPATH="$1"
    fi
    fi
    }

    reset_path
    set_path $HOME/bin
    set_path /usr/local/gcc-2.95.2/bin
    set_path /opt/kde/bin
    set_path /usr/lib/java/bin
    set_path /usr/X11R6/bin
    set_path /usr/local/samba/bin
    set_path /usr/local/ssl/bin
    set_path /usr/local/bin
    set_path /usr/local/bin/gnu
    set_path /usr/bin
    set_path /bin
    set_path /usr/local/sbin
    set_path /usr/sbin
    set_path /sbin
    set_path /usr/ucb
    set_path /usr/bin/X11
    set_path /usr/ccs/bin
    PATH="$NPATH:."

    unset reset_path set_path

  42. Re:Why when you have a package manager? by frleong · · Score: 2

    A package manager exists for Windows, it is called MSI. It is not very sophisticated and sometimes even stupid, but it works most of the time. It allows repair, uninstall and rollback of applications. Windows XP has an additional feature called System Restore that couples with MSI so that it allows driver rollback and return to a given restore point without destroying user documents.

    --
    ¦ ©® ±
  43. To all those suggesting /opt/[applicatinon] etc.. by mindstrm · · Score: 2

    Have you actually had to manage a system that works like this? It's a royal pain in the ass.

    Seriously.. what problems do people actually have with, say, the way debian organizes files now? Can anyone state a real-life issue and how a different system would make it better?

    From all the unixes I've used, I've found, so-far, that debian is by far the easiest one to keep clean; but admin styles differ.. that could just be me.

    The one comment I really dig was the one regarding translucent filesystems... I could actually see that working.

  44. Re:Why when you have a package manager? by mindstrm · · Score: 2

    No package manager in Windows? That's funny.. because I find lately that every install I use uses InstallShield or some other similar tool, and windows lets me remove things via Add/Remove programs.

    Now.. it's not exactly dpkg/apt, of course...
    But it IS a package manager.

  45. Clueless... by LunaticLeo · · Score: 3, Insightful

    Mosfet is a emotionally unstable GUI hacker. His knowlege of the long history and tradition of UNIX administration is pathetic. He ignores simple observables like PATH searches are more expensive than bin lookups. One executable dir per App would be FAR SLOWER than 2000 executables in a single dir.

    This is another classic example of not letting programmers, especially GUI progrmmers, be involved in OS design.

    For those of you who might be swayed by his foolish arguemnts, please read LHS, and the last decade of USENIX papers and LISA papers. Unix systems organization has been openly and vigorously debated for 15years. It has not be dictated by mere programmers from high on above like MS. And RedHat is to be applauded for properly implementing the FHS which is a standard, others like SUSE should be encouraged to become compliant (/sbin/init.d ... mindless infidels :).

    --
    -- I am not a fanatic, I am a true believer.
  46. Re:OSX as a guide? by zephc · · Score: 2

    I absolutely agree! I think that the .app bundle model is a great way to group all the necessary files into on opaque folder, and .framework bundles for grouping libs. I would also like to see a push to something like this:

    /Applications - All progs, GUI and CLI
    /bin - All commandline progs for all users (hidden from normal
    /sbin - All commandline progs for su only

    ~/Applications - holds symlinks to GUI apps you like/use
    ~/.bin - holds symlinks to commandline progs you like/use (hidden in file manager)
    ~/.sbin - like ~/.bin, but only created in root's (or other su's) home dir (hidden in file manager)

    so a normal user would only need ~/.bin on his/her PATH, and root or other su would have ~/.bin AND ~/.sbin in his/her PATH

    But thats just my opinion, I could be wrong =]

    --
    "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
  47. I have played both sides of this arg by ACK!! · · Score: 5, Insightful

    I have been lazy before with my linux box and let package management systems lay out files all over the freakin' place.

    I have done things the "right" way (according to my mentor admin anyway :->) with my Solaris box and followed this standard:

    /usr/bin - sh*t Sun put in.

    Let pkgadd throw your basic gnu commands into: /usr/local/bin

    Compile from source all major apps and services Database services, Web Servers etc...etc.. and put them into /opt:
    /opt/daftname

    symlink any executable needed by users into /usr/local/bin
    (if you think like a sysadmin you realize most users do not need to automatically run most services)

    Any commercial software goes to /opt and put the damn symlink in /usr/local/bin.

    Yes, it is extra work but it keeps you PATH short and fat and your users happy. This is not a problem with distros or package management systems as much as it is an issue of poor system administration.

    I also understand it is a mixed approach with some things put under seperate directory structures for each program and some things in a comman /usr/local base.

    Common users do NOT need access to the Oracle or Samba bin. Give them a symlink to sqlplus and they are happy. Even though it is mixed if you stay consistent across all your boxes then the users are happy.

    I understand it is tough but we have control in *nixes to put things where we want the deal is to use it.

    PATH=/usr/bin:/usr/ucb:/usr/local/bin:.
    export PATH

    All a regular user needs.

    --
    ACK /ak/ interj. 2. [from the comic strip "Bloom County"] An exclamation of surprised disgust, esp. i
    1. Re:I have played both sides of this arg by DaoudaW · · Score: 2

      This is not a problem with distros or package management systems as much as it is an issue of poor system administration.

      This may have held water when most *nix users were IT professionals, but most Linux users today are not, and if Linux is going to gain any desktop market share, they will not be.

      The whole point of distros is that most users are incapable of administering a system. Joe user will burn a CD, make choices during the install process, update/install packages using a package manager and cross their fingers when they have to tweak the system.

    2. Re:I have played both sides of this arg by Rick+the+Red · · Score: 2
      The whole point of distros is that most users are incapable of administering a system.

      I doubt that's the whole point of distros, but that's another topic.

      You make a very good point, one that is lost on most PC users. Like it or not, the average PC user must become an admin. I'm talking home users here. Most business users enjoy some sort of support at work, but when they go home they think they can run their personal PCs on their own. Or worse, they think they can run it like a toaster, with no thought or planning.

      WindowsME was the last Microsoft OS that users could safely ignore; with XP someone should play Administrator (hopefully a parent). Microsoft is trying desperately to dispell this rumor, but there's no denying it: Each user requires their own account, and someone must decide (and implement) what level of access each user gets to each resource. I think the wakeup call will come when their teenager trashes their Quicken files because everyone in the house has Administrator privilages.

      What does any of that have to do with Linux? Well, if we wish to promote Linux (or *BSD) as a viable alternative to Windows on the desktop then we'll need more than KDE or Gnome, we'll also need tools that make administration easy. And we need some guidance in making the decisions that cannot be set by default, such as who has access to the family bank records and who has access to the adult games (do you really want your 6 year old to play Quake?).

      Business Opportunity: If you want to make some money, write "Linux administration for Dummies". If you want to make a ton of money, write "Windows XP administration for Dummies."

      --
      If all this should have a reason, we would be the last to know.
    3. Re:I have played both sides of this arg by Rick+the+Red · · Score: 2
      There's one difference between Win9x giving all users "admin" level access and WinNT/2K/XP having a real Administrator account: When you load an application (like Office or Quake) on Win9x, you are the only user who sees it. You have to manually put the shortcuts on the other user's Start/Programs menus. When you load an application on NT as Administrator, all users will then see it. This is the sort of stuff people don't grok, and M$ appears to want to keep them ignorant of any need for an Admin.

      I guess when you cater to the lowest common denominator you have to treat all your customers like idiots. Sort of like television.

      --
      If all this should have a reason, we would be the last to know.
  48. I don't mind by Anonymous Coward · · Score: 2, Interesting

    having 2000 entries in /usr/bin, just so long as they are executables that do not require dependencies, or libraries that are too specific for the task. When applications grow bigger, their dependencies on other things in the filesystem increase. They'll want an /etc entry, some icons here and there, specific libraries, development include files and so on. That's when the time comes to simply mkdir /usr/local/xxx and ./configure --prefix=/usr/local/xxx. After all that, you can still have symlinks in /usr/bin, but it won't matter, because when you rm -rf /usr/local/xxx, the symlinks go dead and you can remove them.

  49. stow by Anonymous Coward · · Score: 2, Informative

    For "package-managing" stuff you compiled yourself, "stow" is really useful. Install all your apps in their own directory, like :
    /usr/local/apps/foo
    /usr/local/apps/bar

    and then use stow to create the relevant links to /usr/local/bin , lib, man..

    You still end up with bloated /usr/local/* directories, but it's only links. To remove an application, just unstow it and then rm -rf the application directory.
    Another benefit is that you can keep several versions of the same app that way.

  50. always more than one way.... by mrsbrisby · · Score: 2, Insightful
    i'd like to point out that djb came up with a wonderful solution to this very problem.

    http://cr.yp.to/slash.html

    it's not perfect, but it divides the filesystem (mostly) by maintainer - similarly to how packages are already deployed. but beyond that, it creates symlinks into one directory (in his example: /command) to keep $PATH sane.

    package management _still_ makes my life easier- i don't like to hunt around packages manually. but if the filesystem mimicks the packages, we have solved the three biggest problems with package management at the same time:

    • incorrect dependancy names (moot: all other packages have a formed-name)
    • deleting too much (packages are stacked into seperate directories)
    • what happens when the package database goes "poof"

    i'm not saying don't use package management. i'm not saying don't use rpm. i'm actually agreeing with the topic for once and suggesting that we actually do need to change the filesystem.

  51. A suggestion for the path variable by SanLouBlues · · Score: 2

    Why not add in the ability to use subdirectories of dirs in the path variable. I propose use of \+ or something similar at the end of a directory entry to indicate subdirectories should be searched too.

  52. Only a problem for command-line users? by mblase · · Score: 2

    It seems yesterday's article on next-generation user interfaces might be closely tied to this one.

  53. Performance by larien · · Score: 2
    There's also a performance hit in having 2000+ files in one directory, at least in some filesystems (notably UFS in Solaris). As a result, having a packed directory means that it takes longer to find a file in that directory.

    On the other hand, having a $PATH with a gazillion entries just makes for faster searches, but you have to perform more of them. If the application you want is early in the PATH, it will be faster than with the 2000+ files in /bin. If the app is in the last item in your PATH, it will be slower.

  54. Hierarchies and symlinks by Twylite · · Score: 2

    There have been a couple of major points brough up in this debate:

    1. The separation between /usr and /usr/local has existed for ages, and nearly separates base system and add-ons. It should be pointed out that / is also part of this "hierarchy", and contains a minimal boot-capable system.
    2. Having a limited number of locations for binaries makes sense: there is no need for massive PATH variables, and recursive searching can cause security problems. Symlinks can effectively keep access to binaries in one place, while they actually live elsewhere.
    3. Unix people are lax and following the sucky Windows model of putting everything into one directory.

    Now (1) and (2) are good points to bear in mind ... but please, those who support (3), get a life and use Windows sometime.

    The unofficial standard on Windows is to install applications in Program Files\\; which is far better even than just , as it allows vendors to structure their common files. Basically, locality is everything.

    The problem with Windows is its library search mechanism: it looks in the .exe's directory, and windows\system32 (or winnt, as the case may be). i.e. Windows itself places a limitation on hierarchical structure because you can't dynamically specify library paths.

    Now extend this to *nix, without the limitation: /, /usr, /usr/opt, /usr/local and /opt become your base locations into which stuff can be installed.

    / stays the same - essential binaries necessary for booting and recovery. /usr becomes all system utilities that are required and cannot be removed (unless you are seriously fiddling with the distribution). / and /usr keep the same structure as they currently have: none.

    /usr/opt is the location for packages that come with the distribution, but are optional. Packages are grouped by "vendor", and then by "app" (read: group = directory). Binaries get symlinks into /usr/bin and libraries get sumlinks into /usr/lib.

    /usr/local is for stuff you compile yourself. /opt is for third party applications that you install. They use the same vendor and app catagorisation, and have symlinks to /usr/local/bin, /usr/local/lib, /opt/bin and /opt/lib, as appropriate.

    Of course at this point we should probably add that we should employ /var, /usr/var, /usr/local/var and /opt/var directories; as well as /etc, /usr/etc, /usr/local/etc and /opt/etc, all with symlinks to the relevant files in their proper locations.

    And there you have it: hierarchical segregation for them all and symlinks to bind them.

    --
    i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
  55. # rm -ff /usr/bin by ellem · · Score: 3, Informative

    The final solution to this mess.

    Unless you are hand writing each file in /usr/bin who cares how many files their are there?

    And Windows != /usr

    Program Files == /usr

    --
    This .sig is fake but accurate.
  56. Utter baloney. by mindstrm · · Score: 2

    The reason a great many commands are in /usr/bin is because they are viewed as commands.. or small tools. It's the unix way. I *expect* them to be in /usr/bin; I don't WANT a different subdirectory for each individual file.

    Comparing this to Windows using the Windows subdirectory is wrong; that truly WAS a mess.

    But I *know* that, if I install a program called, say, fooapp, that the binary will be /usr/bin/fooap, and the config file will be /etc/fooap.something, or if there are more than one config file, /etc/fooap.something/

    Before (and after) reading this article, it occurred to me that I just don't see the problem the guy is getting at.

  57. The /var directory is in bad shape too by geirt · · Score: 2

    The /var directory used to be for files that are difficult to backup to tape, because they varies too much (*see* that's the reason for its name). A backup of /var used to be outdated after a few hours.

    The print spool, the incoming and outgoing mail spool, pid and lock files and the man file cache are all files that changes rapidly, and in general does not need to be backed up every day. You need a backup of its directory structure in case of a disk crash, but doing a complete backup every night used to be a waste of time.

    That is history. Now people wants to mount /usr read only, so they are slowly moving all files that must stay on a RW file system from /usr to /var (eg. /var/www for your web site). This is stupid, because you need to do a backup of some directories in /var but not all. The grand idea of /var is lost.

    Please stop this trend before it is too late.

    --

    RFC1925
    1. Re:The /var directory is in bad shape too by omega9 · · Score: 2, Insightful

      I've been slowly reading these posts and it seems like, while there are a few genuine issues, there are also a lof of lazy complainers out there. Aren't we all goofy for our favorite operating system because it's 'open' and we can 'do what we want'? We'll then freakin' do it.

      The parent poster, for example, is trying so hard to impress with his knowledge of the history of /var (available in pretty much any *nix book), yet fails miserably when it comes to understanding that there is no gun to his head forcing home to keep html in /var/www. I agree, I think /var/www is an odd place for html data, but there's always the option of changing your http root directory, moving it somewhere else and symlinking back to /var/www, or a few other options.

      As for the posters mentioning how the Dark Side (Windows) does it, remember that even though Windows has the Progra~1 structure to keep things seperated, if any of that stuff is needed at a system level or if any of those programs need to call proprietary libraries, many times they will dump bloat into your /winnt or /winnt/system(32) directories or add to your PATH. I hate it when I'm uninstalling and it asks something like "Would you like to remove C:\Winnt\System32\SGF32.DLL? Some programs may still be using it!" It turns into a lose-lose situation: I'm either going to break some software or create complete bloat. And with Windows you're pretty much stuck with what you got. Even if there were symlinks in Windows you still wouldn't be able to create a makeshift /usr/bin for yourself. Most of the programs keep their own libraries in their own directories and would require a "working path" pointing to it to operate.

      There are a few people in here that seem to have found personal solutions for getting around FSS quirks. Quirks there are, but with a few symlinks, #!'s, and other toys it's possible to build a very comfortable and logical system.

      Just be careful you're not turning into Twoface. It's not really effective to preach about Open Source virtues and then turn around and bitch about something when it's those same virtues that will solve your problems.

      --
      I'm against picketing, but I don't know how to show it.
    2. Re:The /var directory is in bad shape too by geirt · · Score: 2
      omega9 wrote:

      The parent poster, for example, is trying so hard to impress with his knowledge of the history of /var (available in pretty much any *nix book), yet fails miserably when it comes to understanding that there is no gun to his head forcing home to keep html in /var/www. I agree, I think /var/www is an odd place for html data, but there's always the option of changing your http root directory, moving it somewhere else and symlinking back to /var/www, or a few other options.

      I would agree with you, if it only was /var/www, but how about the complete postfix chroot environment in /var/spool/postfix (eg. /var/spool/postfix/etc/passwd ) ? What about the printer configuration files in /var/spool/lpd/{printer name}. What about the gdm faces in /var/gdm ? Heck, how about the compete RPM database in /var/lib/rpm ? This is all pollution of the /var hierarchy.

      In a follow up omega9 writes:

      Anyway the point of this post is just to mention that all distros that I'm aware of that use the /var/www directory for html data do not actually store it there. /var/www/html is a symlink to /usr/local/apache/htdocs by default.

      You are lucky, the only distro that I know well (RedHat) stores the html files in /var/www since RedHat 7.1. /var/www/html is a real directory. Which distros are you aware of ?

      --

      RFC1925
  58. Missing the point by Birdie-PL · · Score: 2, Interesting

    I think that he is missing the point.
    One the aims of all the package management tools is to make the management easier. In particular this means, that you don't have to care, where are the files of application XYZ. So, if you wish to delete this, you ask your manager instead of finding all the subdirectories created by the package. You want to save your time, so you use the tools available. Era of manually managing everything is long gone.
    Please note, that under Unices most of the applications are not installed in single directory - one is for binaries, one for documents, etc.
    Under DOS and Windows, even the apps that went into their subdirectory had an annoing habbit of creating miscellaneous temporary/configuration files all over the place. And lack of file attributes did a lot to help this.

    --
    e-mail: karol at tls-technologies.com
    www: http://www.tls-technologies.com
    sig: not found
  59. In some respects, I agree. by GISboy · · Score: 3, Interesting

    When you consider the /usr or /local was similar in purpose as "program files" (or progra~1 if you want to be specific) had the best of intentions.
    Well we know about which road going where based on good intentions.

    At any rate, part of the "problem" is there is a certatin point a section of the file system gets unmanageable. Where that is, quite frankly, varies.

    RedHat has impressed me with its compatability but it does so with static libs. There are times when god forbid you should wish to compile something and get gripe messages that you window manager was done under X set of libs, your theme manager under Y's libs and your shared libs are of version Z.
    That is just trying to update the WM, god forbid you wish to compile a kernel.
    And with the static libs, the performance hit is astounding.

    The other side, as with Slackware, is shared libraries can be as unforgiving as well.
    Heh, as a newbie I deleted a link to a ld.so.X.
    Hint: never, ever do this! ls, ln, mv et al stop working...oops.
    Stupidity on my part, but, hey, I was a newbie. (finger; fire; burn; learn. simple.)
    Back on track. Slack is fast, configurable but through sheer will, accident, or stupidity can be broken a lot faster (and in some cases fixed a lot faster).

    Windows...well the sword cuts both ways. It impresses and suffers *both* of the good and bad points of RH/SL (or static and dynamic libs).

    And, if the above does not either blow your mind or make you nod off consider OS X.1.1 (.1.1.1....)

    Under OS X's packages system a 'binary/folder/application' (oye) can and does contain static libs. Ok, that can be good/bad.
    Here is the kicker (and cool part): if it finds *better* or more *up to date* libs it can use them and ignore what *it* has.
    If the new libs break the app, or cause problems, the application can be "told" or "made" to use only its own libs, or update the newer libs.

    Most will see where that is going. It will be good to keep "static" then use "dynamic" or update the "dynamic/shared" libs.
    The down side is the potential to fix one application and break 10+ others.

    This has not happened...yet. However, the *ability* to make or break is there, just no information is given until a spec/CVS set of rules is fleshed out.

    I will be the first to admit that the "binary folder" or "fat binary" (arstechnica.com article) idea sounded "less than thrilling"...until you realize the headache's it cures with this kind of file system bloat.

    Think about it: You have an app, that is really a folder, that you can't see inside/manipulate/fix/break unless you know how *and* have a reason to.

    In all three cases there are limits to even the most intelligent of design. Knowing this truth is easy to accept. Finding where it lies and where it breaks down...that is another discussion.

    --
    If it is not on fire, it is a software problem.
    1. Re:In some respects, I agree. by Nailer · · Score: 2

      When you consider the /usr or /local was similar in purpose as "program files" (or progra~1 if you want to be specific)

      cd program files
      C:\program files

      Works in Windows

      touch "test directory"
      cd test directorybash: cd: test: No such file or directory

      Doesn't in Unix
      Have a nice day :D

    2. Re:In some respects, I agree. by Richy_T · · Score: 2

      And in NT:

      C:>touch abc def
      Can't touch abc - No such file or directory
      Can't touch def - No such file or directory

      Moral: In Windows, never expect the same thing to work the same way twice. Not that Unix is any better in those regards of course.

      It's true that there are some apps that consider the command line as a whole item rather than separate arguments but on the whole, isn't it better to be consistent? That means treating each argument as a separate filename and having to escape or quote special characters (including spaces)

      You wouldn't want to know the trouble I've had trying to work with multiple levels of quoteing (") in windows. Now, was that "", """, """" or """"""?

      Even better, it's not documented.

      Rich

    3. Re:In some respects, I agree. by Ben+Hutchings · · Score: 2

      This depends on which C library the program uses. If it's the Microsoft C run-time then you can escape a double-quote by putting a backslash before it. If there are literal backslashes before a double-quote (whether or not it is escaped) then you need to double them. Cygwin unfortunately uses a different rule and I couldn't find a totally reliable way to pass any old string of double-quotes and backslashes to it. Some DOS-compatible commands like cd have compatibility kluges to cope with lack of double-quotes, and I think the shell has a kluge to cope with lack of double-quotes around the command name, but systematic quoting/escaping should be accepted too.

  60. FHS 2.x - Filesystem Hierarchy System by renehollan · · Score: 3, Interesting
    This is one of the things that FHS tries to address. I used FHS 2.1 in Teradyne to manage a custom GNU/Linux distro for one of their products [If you purchased NetFlare from them, you should have all the updated GPL goodies and additions I put there on a source companion CD].

    While not perfect, it addressed the following issues:

    1) separating O/S from "other" packages;

    2) maintain a sane place to put different packages;

    3) support the notion of linking to specific package directories from a common place to keep PATH small;

    4) was compatible with a number of "traditional" conventions.

    Of course, FHS 2.1 has this concept of the "operating system" files and "other files". Presumably the "operating system" is that which the distro bundler provides... so Red Hat would be free to put as much as it wants under /usr. But this causes a problem if you looks at a common standard base for several distros, like the LSB.

    Do you have a "standard base" part, and a "distro part", and then a "local part"? Clearly what's needed is a hierarchical way of taking an existing "operating system" and customizing it to a "custom operating system". Right now, FHS allows this for distro bundler and end user, but there is no support for the process iterating.

    Of course, my experience has been with FHS 2.1 and have since moved on to employment elsewhere, so perhaps the FHS addresses these issues.

    --
    You could've hired me.
  61. Redundant files / duplicate names by DaoudaW · · Score: 2

    I've been using Mandrake for a couple of years and hadn't noticed this problem. (RPMs provide some insulation) But I totally agree that its not the way things should be done. The biggest problem, as I see it is that it allows for no redundancy in the names of binaries. What if someone slips up and includes a filename in a package duplicating one already in /usr/bin. If its a new install I'll be alert enough to abort, but if its a re-install I'll assume it just didn't get cleaned up from the previous install and overwrite.

    Interestingly enough, /usr/share/doc, does install each app in a separate directory...

  62. Look at opt_depot by jonabbey · · Score: 4, Informative

    Many years ago, we wrote a set of Perl utilities for automating symlink maintenance called opt_depot.

    It's similar to the original CMU Depot program, but has built in support for linking to a set of NFS package volumes, and can cleanly interoperate with non-depot-managed files in the same file tree.

  63. Why windows doesnt... by Bazman · · Score: 5, Funny

    The reason windows apps can happily install binaries in any directory is because they then go install their shortcuts in the Start menu, or the desktop. Of course if you want to run one from a command line interpreter you're pretty stuck.

    So now my windows Start menu has 1000 items in it, but at least they are arranged hierarchically in 850 vendor program groups...

    Baz

    1. Re:Why windows doesnt... by Pinball+Wizard · · Score: 2
      Windows has a PATH environment variable as well, you know, and any decent program that actually has a command line interface will make use of this.


      See Active State Perl for a good example.

      --

      No, Thursday's out. How about never - is never good for you?

  64. trouble... by curtis · · Score: 2, Interesting

    Is it me or does controversey always follow this guy around? :-)

    He does make a good point but I think once the history of the file system evolution is taken into account, the layout makes sense. The problem is, not every distribution adheres to the fs layout unwritten rules for various reasons and the result is a mess.

    Hopefully, the Linux Standards Base will help to address this.

  65. I think he's is quite correct by Jack+Auf · · Score: 3, Informative

    Most major distros install quite a bit of stuff by default that you will 1) you probably will never use 2) you probably dont know what it is 3) if it's a server you don't need anyway

    This is one of the reasons I created Beehive Linux. It aims to be secure, stable, clean, FHS compliant, and optimized for hardware built in this century. Current version is 0.4.2, with 0.4.3 out in a week or so.

    On one point however I must disagee with Mosfet:

    The most obvious thing is separate the big projects like desktop projects into their own folders under /usr

    The FHS states: /opt is reserved for the installation of add-on application software packages. A package to be installed in /opt must locate its static files in a separate /opt/ directory tree, where is a name that describes the software package.

    Beehive puts large packages like apache, mysql, kde2 under /opt in their own subdirectory i.e.; /opt/kde2. I think this is a much better solution than cluttering up the /usr heirarchy, and makes it very simple to test a new version of without destroying the current setup.

    --
    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety" - BF
    1. Re:I think he's is quite correct by Nailer · · Score: 2

      The FHS states: /opt is reserved for the installation of add-on application software packages.

      Thats great, especially when the FHS resfuses to clarify what `add-on' application software is.

  66. He missed a major point of the FSS by Anonymous Coward · · Score: 3, Insightful
    One of the major points of the FSS is to organize files by type. What I mean by that is executables are placed together, configuration files are placed together, man pages are placed together, etc. This is important for a number of reasons:

    - systems may need a small partition with all files needed to boot
    - configuration files need to be on a RW filesystem, while executables can be RO.
    - many other reasons (read the FSS)

    That doesn't mean all executables need to be in a single directory under /usr/bin. I agree it would be nice to come up with a good way to allow subdirectories and change the FSS accordingly. Just don't argue that all files related to a given piece of software be in a single directory as some have requested. That will make the life of an administrator of large systems even more difficult. My wife works in a place that does that and their system is nearly impossible to maintain.

    Sure the FSS isn't perfect, but I have yet to see another system that does as good a job. Don't throw it away simply because you don't understand it, or even worse, because its biggest fault is a directory with 2000 entries.

    -- YAAC (Yet Another Anonymous Coward)

  67. Look at the "modules" project by \/\/ · · Score: 3, Informative

    I agree that this is a Linux-related issue that mostly stems from lazyness. I have been using the modules approach for tool management for years with very good results - even half a decade ago this was more advanced than any Linux approach out there today.

    With this approach each tool/version-combination gets its own directory, including subdirectories for libraries, source code, configuration files etc.

    You can then use a "module" commando to dynamically change your PATH, MANPATH, ... environment to reflect the tools you want to use (note that this supports the usage of a tool, it is therefore not a replacement for package management tools like rpm, which are mainly concerned with installation.)

    Each tool/version combination comes with an associated modulefile (which has a tcl-like syntax) where you can influence a user's system environment upon loading/unloading the module. It is also possible to e.g. create new directories, copy default configurations or do platform-specific stuff for a tool (which greatly helps users less fluent in Unix, since they do not have to care about stuff like shell-specific syntax for setting environment variables).

    It also allows you to give tool-specific help, e.g.
    $ module whatis wordnet
    wordnet: Lexical database for English, inspired by psycholinguistic theories of human memory.
    $ module add wordnet


    This is also very helpful if you want to keep different versions of the same tool (package, library) around and switch between them dynamically, e.g. for testing purposes (think different jdks, qt-libraries, etc.). With modules, you can e.g. do a simple
    module switch jdk/1.2.2 jdk/1.3.1
    and runs your tests again. And you never have to worry about overwriting libraries, configuration files etc. even if they have the same name (since they are kept in a subdirectory for each version).

    For our institute I've set up a transparent tool management system that works across our Linux/Solaris/Tru64 platforms. All tools are installed this way (except the basic system commandos which still go into /bin etc.).

    Of course, it's a lot of work to start a setup like this, but in a complex environment it is really worth it, especially in the long run.

  68. another tool: graft by opus · · Score: 3, Informative

    The tool I use (and prefer to GNU stow) to manage the stuff that isn't managed by a package manager is graft.

    For stuff that uses GNU-style configure scripts to build, it's simply a matter of, e.g.

    $ ./configure --prefix=/usr/local/vim-6.0
    $ make
    # make install
    # graft -i vim-6.0

    The files themselves are stored in /usr/local/vim-6.0, and graft creates symlinks in /usr/local/bin, /usr/local/man, etc.

    Removing the software simply involves:

    # graft -d vim-6.0
    # rm -rf /usr/local/vim-6.0

    That said, I usually rely on the package manager, and don't really have a problem with 2000 files in /usr/bin.

  69. GNU stow by ggeens · · Score: 2, Informative

    There is a package which does just that: GNU stow. I use that to organize /usr/local. Very easy to use.

    You install each package under /usr/local/stow/<packagename>, and then you run stow <packagename> to make the links. After an upgrade, you do stow --restow <packagename>.

    (To me, having all binaries in /usr/bin is not a problem: the package manager takes care of them. And stow is sufficient to handle the things I install locally.)

    --
    WWTTD?
  70. Re:OSX as a guide? by zephc · · Score: 2

    addendum:

    while one could just make ~/.bin and ~/.sbin symlinks in and of themselves, or just use the original dirs on the PATH, with you own folder, you can install your own CLI progs in there, without contaminating the originals

    same goes for ~/Applications... add symlinks, or real whole applications that you install and dont want to pollute the /Applications dir

    --
    "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
  71. Re:Folder? by ThatComputerGuy · · Score: 2

    "What is mind? No matter. What is matter? Nevermind."

    --
    XML is like violence. If it doesn't solve the problem, use more.
  72. Re:To all those suggesting /opt/[applicatinon] etc by jonabbey · · Score: 3, Informative

    Have you actually had to manage a system that works like this? It's a royal pain in the ass.

    Yup, I have. In fact, we've managed all of our UNIX systems that way for the last 8 years or so. It's not a pain in the ass at all.. in fact, with the opt_depot scripts we wrote, we support automagic NFS sharing of packages for all Solaris systems in our laboratory. Indidivual system administrators can choose to use a particular package off of their choice of NFS servers, or they can simply copy the package's directory to their local system.

    Using symlinks gives you complete location independence.. all you need is a symlink from your PATH directory to the binaries, and a symlink from the canonical package location (e.g., /opt/depot/xemacs-21.5) to the actual location of the package directory, be it local or be it NFS.

    There's a group at NLM who is working on tools and standard practices for managing NFS package archives using RPM, and then using the opt_depot scripts to integrate the package archives with each local system automatically.

  73. Why package management sucks by TomatoMan · · Score: 5, Interesting

    Package management is a way to standardize the way software is installed, upgraded, and removed.

    It sounds very appealing. The problem is that a lot of the software I need right now (openLDAP, openSSL, etc) has packages that are a full development generation old. There isn't a 2.x package yet for openLDAP on RH 6.2, for example, and I don't think anybody in particular is in charge of building it.

    Building from source is the only way to be current, although it is often an immense pain in the ass.

    The other gripe I have is about packages failing to recognize libraries that are installed just because they weren't installed by a package manager. Yes, you can force a --nodeps sometimes and cross your fingers, but you shouldn't have to lie to the software to get it to work. Package managers should be a little smarter and be able to look around a little to satisfy dependencies.

    If the package system really worked cleanly, it would be great, but I'm still using Pine 4.20 on my box because of conflicting dependencies in the 4.3x packages. I'm about to nuke the whole thing and build Pine from source - which I'll do as soon as I can get those library dependencies solved.

    Grr.

    --
    -- http://frobnosticate.com
    1. Re:Why package management sucks by Psiren · · Score: 2

      The other gripe I have is about packages failing to recognize libraries that are installed just because they weren't installed by a package manager.

      If you use a decent system (read Debian ;) then the package wouldn't be available to install if all its dependencies weren't available either. So you wouldn't have this problem. I have very few files in /usr/local as Debian testing is pretty much up to date.

    2. Re:Why package management sucks by mjh · · Score: 3, Informative

      Score:+1, Insightful (Virtual Moderator Point)

      As a debian user, I'm a big proponant of using a well thought out package system. But, you're entirely correct. If you have a core system componant (like a library) and the packaged version doesn't provide a piece of functionality that you need, you are completely screwed.

      Installing that one library from source doesn't solve the problem. The package mgmt system doesn't see the lib that you installed so it still doesn't install the prog that you want.

      So you end up with two choices: install everything from source, or install everything from the package manager.

      Debian uses the equivs package to resolve this problem. Basically, you use equivs to create an entry into the package for everything that you install from source. So let's say you install libFoo from source. And the package bar depends on libFoo. You create an equivs package that you install that provides "libFoo". Now you can install the prepackaged bar and everything works.

      The other alternative is to add an additional step to everytime you compile from source: create a package for the system you're operating on. Sometimes this is easy, sometimes this is very difficult.

      My point is that there are ways of interoperting a packaging system with programs that are installed from source.

      Hope this is helpful.

      --
      Key to financial independence: Spend less than you earn. Save and invest the difference. Do it for a long time.
    3. Re:Why package management sucks by monksp · · Score: 2, Insightful
      If you use a decent system (read Debian ;) then the package wouldn't be available to install if all its dependencies weren't available either. So you wouldn't have this problem.

      I don't think that's really what he's talking about.. With both rpm and apt, if you compile a library from source, the package manager won't consider said library to be installed. So once you upgrade your library, the pm will still tell you 'Library foo.so not available' and not install (Or worse, install a different copy when you're not looking.)

      This becomes especially nasty when a package maintainer hasn't updated their package yet, and you need a bugfix/feature that the newer version has.

      --
      -- My work here is done. If you need me again, just admit to yourself that you're screwed, and die.
  74. Absolutely correct by Eryq · · Score: 2
    This is similar to what we do -- actually, we go one step further: every VERSION of every package (emacs, etc.)) has its own directory. So:
    • /opt/package/foo is a link to /opt/package/foo-1.2 ...
    • and /usr/local/bin/food is a link to /opt/package/foo/bin/food ...
    • and you can re-generate /usr/local/bin from scratch with a simple script when things change.
    For our software , we also separate...
    • software
    • configuration files
    • run-time data
    --
    I'm a bloodsucking fiend! Look at my outfit!
  75. installshield isn't a package *manager* by David+Jao · · Score: 2
    I wouldn't call Add/Remove programs a package manager. Sure it lets you install/uninstall, but this hardly qualifies as management in my book.

    As far as I know, in windows there is no way to:

    • output a complete list of what files belong to a package
    • query a specific file to find out what package it belongs to
    • list what other packages a package depends on
    • list all other packages that depend on a given package
    I am not nitpicking here. These are legitimate gripes.
    1. Re:installshield isn't a package *manager* by mindstrm · · Score: 2

      Of course. It's not the same thing, I realize.
      However.. most software nowadays has an installer that checks to see if the required software is installed already.
      On top of that, most windows software is largely self-contained.
      I'm not excusing it; you are right, it's not nearly as sophisticated.

      But package management means, at a base level, the ability to add and remove packages, which this does. It does not do dependency management, version management, etc.

  76. Yep the Unixtree in Linux is a mess by DABANSHEE · · Score: 2

    Check out the modified Unix style tree that BeOS uses

    The whole (modified) Unix tree is inside a directory called 'BeOS', that only BeOS system upgrades from Be Inc touch.

    Parrallel to 'BeOS' is 'home'. In home you can creat directories for whatever you want. a 'downloads' directory for downloads, with a 'apps', 'drivers' & 'shared files' inside, & inside 'shared files' you could have 'video' & 'music', inside 'video' you'd have 'porn', etc, etc

    Parrallel to 'downloads', you can have a directory called 'installed apps', where you install aplications. If a file sharing program demands that its file sharing folder must be inside the program's install directory, that's no problem - you just symlink it to 'shared files' directory in the 'download' directory mentioned above.

    Also inside 'home', you could creat a directory called 'installed drivers', where installed drivers go

    This is where the beaty of BeOS file heirachy comes into play - also in 'home' is a 'config' directory which is a complet symlink mirror of the 'BeOS' Root directory, so if any apps need to load lib depencies, etc they load them here. As I said before the actually 'BeOS' directory only ever gets touched by BeInc system upgrades. So you need never go anywhere near the 'BeOS' directory. So one need never worry about WTF bin, lib, usr, etc, etc (:)) means.

  77. not even close by David+Jao · · Score: 2, Informative
    If it's even close the the standard of the windows uninstaller, it'll leave a ton of files lying around

    It's not even close.

    The windows uninstaller, as far as I know, provides no way for you to:

    • list what files belong in a package
    • for a given file, list what package that file belongs to
    • list all other packages that a package depends on
    • list all other packages that depend on a given package
    Unix package managers do allow these things, so you can see exactly what it is doing and make sure that it works right.

    Also, in windows there is no centralized package management app -- Add/Remove programs pretends to give you central control, but behind the scenes it really just runs the uninstall app provided by the 3rd party vendor. In Unix, the situation is quite different -- there is a central program to manage packages (rpm on redhat, dpkg on debian, ports on BSD), and so there is no opportunity for lazy 3rd party developers to screw things up.

  78. You can tell it is going too far when.... by GISboy · · Score: 2, Funny

    you see something like this:

    /usr/local/bin/games/educational/for/kids/readin g/ about/see/spot/run/page1/paragraph1

    (Yes, I suppose when I use turn signals *backing out* of the driveway does qualify as anal retentive).

    --
    If it is not on fire, it is a software problem.
  79. Re:Laziness is a virtue by hexix · · Score: 2

    Well if we're talking about this in terms of linux becoming a desktop OS. I don't think it matters.

    Every person I've ever met that uses windows and doesn't know much about computers (e.g. your ordinary desktop user). NEVER goes through the program files.

    All they do is access programs from their start menu, uninstall them using the add/remove programs. And then go into my documents for their mp3/image/whatever files or sometimes just make directories on their desktop to hold them.

    To say that the fact that we put all executables into /usr/bin is going to hold back the use of linux as a desktop OS is just stupid. There are things holding back linux, but that is not one of them. The users could care less, they want to manage the programs through graphical tools, and that's exactly what distros like Rehdat and Mandrake are giving them.

  80. No (offtopic) by King+Of+Chat · · Score: 2

    No good reason? The reason stuff ended up in \Win(dows/NT)\System(32) was because, in order to get your program to work, you had to make sure that system files, common controls and third party controls were up to date. Prior to "side by side" bullshit, if you installed a DLL into the same directory as your executable, and it was used by another program, you could get interesting effects - eg Excel first and everything works, launch your prog first and Excel doesn't work. Reason? Older copies of the COM DLLs in your program's directory (severe slapping required for someone). Same applies to third party controls.

    If the COM DLLs hadn't changed every 3 months (normally with the latest IE or Office) then you would never have to update the damn system files. SFP? Fucking brilliant solution to a problem which Microsoft created. I've been in charge of big shrink-wrapped stuff to go on MS OSes and, trust me, getting an installation which works is the hardest thing.

    Oh well, I had some karma to burn.

    --
    This sig made only from recycled ASCII
  81. Re:So what...? by hexix · · Score: 2

    Yeah, I totally agree. I'm having no problems with the current way. And he said he installs from source and puts programs where he wants them to be, so I'm not sure why he has a gripe.

    My guess is that since he is the author of the High Performance Liquid theme for kde he has been getting a lot of emails from redhat users asking why when they just configured, make, and make installed it it didn't show up in KDE's configuration options. And the reason is probably he has it installing to /usr/local/kde/

    But I've seen RPM and DEBs of high performance liquid so he can just tell those users to install using them and problem solved.

    I do see some advantages to having programs in their own directories though, such as being able to find a global configuration file for a program easily.

  82. Re:The Alternative? No Alternative! by rnturn · · Score: 5, Informative

    We do the same thing on our Tru64 boxen. All 3rd party software goes in /opt or /usr/opt. 3rd party executables go in /usr/local/bin. Some executables live in an app-specific subdirectory under /opt and the symlink in /usr/local/bin points to the physical location. It makes OS upgrade time tons simpler. And the first step of our DR plan is to backup OS-related stuff and backup software on special tapes. Those get restored first so that we get a bootable system in a hurry. Then the rest of the software and data can be restored using the 3rd party backup software. None of this would be as easy to do if we had 2000 programs all living under /usr/bin. If Mosfet has a point it's that some distribution vendors make a mess out of the directory structure by dumping way, way too much stuff under, say, /usr/bin.

    \begin{rant}
    RedHat, are you listening? I like your distribution but the layout of the files you install sucks big time. Anyone who updates their applications (Apache, PostgreSQL, PHP, etc.) from the developer's sites has to undo the mess you guys create. Either that or don't install the versions on your CDs at all and just go with the source tars.
    \end{rant}

    (OK, I feel better now...)

    --
    CUR ALLOC 20195.....5804M
  83. Offtopic pedantry by tjgoodwin · · Score: 2, Informative

    Possessive its has no apostrophe.

    The word it's, being a contraction of it is, has an apostrophe.

    The word its, meaning belonging to it has no more apostrophes than his.

    I know this is boring pedantry, which will be modded off topic. But the article in question misapostrophises its 9 (nine!) times, compared with 5 correct uses.

  84. Stow! by Urban+Garlic · · Score: 2, Informative

    Because of it's openness, Linux is also self-repairing. Clutter in main directories is a real problem, and instead of ranting about it, at least one person went ahead and built a work-around, by writing "stow".

    This is a utility that allows you to put executables for packages where you like, and then automatically creates symlinks from the main /usr/bin, /usr/lib, etc. directories into the right place. It destroys those links when you unstow, and minimizes link-count by putting the links in at as high a level as possible, and unlike package-maintenance schemes, doesn't rely on a package database, so there's no danger of it being incomplete or out of date.

    --
    2*3*3*3*3*11*251
  85. /usr/local vs. /opt by coyote-san · · Score: 2

    /opt is for external packages that are not part of your "core" system. Any third-party package (not from your distro) should definitely go here, although some distros make them damn near impossible to create with their standard tools. (Cluestick: maybe offical packages should never put stuff in /opt, but by the same measure unofficial packages should never put stuff into /usr/bin! Yet some distros have tools that make this nearly impossible.) Some vendors also put their official, but optional, packages in this directory.

    /usr/local is for internal packages that are not distributed outside of your organization, for data files that don't fit anywhere else, etc. (Cluestick: see above. I'm also in the camp that says everything under /usr/local should also be under package management.)

    The line isn't always clear cut, but a good touchstone is the package management. If it's already packaged, put it in /opt. If you have to package it yourself, put it in /usr/local. Another approach is to ask where you turn for updates. If it's another company, website, etc., put it in /opt. If it's Sue down the hall, put it in /usr/local. In both cases, if you distribute your package outside of your organization you (and they) should put the package under /opt.

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  86. Re:Application Paths by Make · · Score: 2, Informative

    Ever heard about ./configure --prefix=/where/ever/you/like ? You have got the choice.. use rpm/dpkg or configure.

    And, hm, about your lovely windows: do your apps ask you in which c:\windows\system32 they should put their dll trash?

  87. I do not *want* to look at my /usr/bin directory by 47PHA60 · · Score: 2

    As a longtime sysadmin, I use one big file system /usr/bin and drop everything in there. I hardly ever need to look inside /usr/bin. Even if my pkg data gets trashed (and I am too foolish to mirror it), I at least know where to look for the programs: /usr/bin.

    I've seen various postings and rants around technical sites looking for a 'new paradigm' to replace the file cabinet/desktop metaphor. Well, if we use the info in a system using pkgadd or RPM, it could be possible to ask the computer: 'any spreadsheet apps on this system?' Of course, the answer is only as good as the package maintainer's enclosed info, but it's an idea for a better way to manage a system, especially if you could add your own comments and keywords to your pkg database. Much better than 'find; cd; ls; strings.'

    Look at how the Mac improved things with resource forks. I don't care where Excel is installed, because I open the _file_, not the app. If Excel is not installed, my Mac can still tell me it's an Excel file (whatever that is, but still, I know to ask the helpdesk for Excel).

    On my UNIX systems, if I want to know what all those files in /usr/bin are, I feed the path to the pkg manager to find out. Why should I muck about with subdirs, huge $PATH's, and symlinks? In my experience, that makes a system too complex for one person to manage well, and every system's different paths figure into the management hassle.

    If I need to secure an app from unauthorised users, I'd like to say 'set this installed package so that the owner is sybase, the users are fred and tony, and the only owner can use pkg manager to upgrade these files,' instead of poking around in /usr/subdir and using chmod, faclset for the rest of the day.

    If you look at the history of RedHat, the manual I got for version 3 says that RPM was developed because more time was being spent maintaining a linux system than using it. Amen. When I started using RPM, I could manage much more software on many more machines than I could when I was using the old 'make, make install' method.

    At my office, I never compile and install software with 'make install' scripts. I instead install it to a special chroot environment and build a Solaris pkg file from there. Then I can install, upgrade, or erase it from any of my 100 servers very easily. Add cfengine to the mix, and I can do it all from one server.

    Are we sysadmins, or users? Thank goodness for package managers, I say. When I am dealing with executable binaries and shared libraries, I only want a file system to prevent corruption, provide security and fast i/o (and maybe give me historical views of itself, a la Clearcase, but that's a different thread). I want package managers to monitor installed software, unauthorised changes to binaries, new binaries that don't belong to a known package, and other management/security info. If you think of your computer as a file cabinet, it'll soon look as messy as your physical file cabinet. I like to think that as meta-data management improves, that will matter less and less.

  88. QNX has it by Wesley+Felter · · Score: 3, Interesting

    QNX has a package filesystem like what you describe; it looks like it solves Mosfet's problem and keeps PATH simple.

  89. Minor revamp, no need to scream by praedor · · Score: 2

    Dump /opt. It is redundant philosophically to /usr/local for the most part. Each non-system addon app gets its own directory in /usr/local and the package manager/installer automatically creates a symlink in /usr/local/bin to the apps real binary in its own directory.


    I still don't get /opt. Really. I see no logical or real difference to simply using /usr/local or, if you wish, stick it in its own directory in /usr. Instead of sticking files all over /usr or /usr/local everything specific to the app goes into its own /usr/ or /usr/local/ directory tree and symlinks are created in /usr/bin or /usr/local/bin. Path stays simple and you ALWAYS know where all the files for any app are.

    --
    In Bushworld, they struggle to keep church and state separate in Iraq as they increasingly merge the two in America.
    1. Re:Minor revamp, no need to scream by kindbud · · Score: 2

      On some systems (like Solaris), /usr is considered read-only and shareable for the use of diskless clients. This is where /opt comes in. It keeps optional software not intended to be shared, out of the shareable /usr tree. Simple as that.

      --
      Edith Keeler Must Die
  90. Re:Laziness is a virtue by scott1853 · · Score: 2

    Duh, this won't affect the average grandma using a computer for e-mail.

    It's going to be one more reason that will prevent an advanced Windows user from switching to Linux. Of course there are a million other reasons as well.

    But it's also a stumbling block for anybody that is serious about creating software for Linux if they are just going with the defacto standard of shoving everything into one folder. Why not put EVERYTHING in one folder then. It's just one of those things where it's not exciting enough for a developer to spend his time fixing it. That's another issue though.

    My original comment wasn't meant to provide the magic solution as to why more people don't adopt Linux, it's a single piece of a 20,000 piece puzzle.

    BTW, to the person that modded my original comment as a troll, grow up.

  91. compromise: by Enahs · · Score: 2

    use epkg.

    epkg has been around a while; it works by making symlinks in /usr/local, while the actual software is installed in its own subdirs. It's a compromise between keeping everything in their own subdirs and managing $PATH, and it works quite well. :-)

    --
    Stating on Slashdot that I like cheese since 1997.
  92. Who needs directories? by CynicTheHedgehog · · Score: 2, Interesting

    Why not store all files in some kind of root context, then augment them with attributes describing what type of file it is and what relationship it has to other files, and who is allowed to do what to it. That way everything is in the path (and I mean *everything*) but graphical filesystem browsers can organize things however they want by reading the file attributes.

    You'd run into naming conflicts, but those can be resolved transparently by the filesystem. Think of it like a database with a multi-column key: the filename and it's path.

    1. Re:Who needs directories? by Spinality · · Score: 2, Interesting

      This is kind of a wacky solution -- eliminate hierarchical directory structure and replace it with a (presumably) hierarchical attribute structure. I cringe. But I think this idea points out one key issue. We currently use the hierarchical directory tree to represent two orthogonal properties: logical file organization versus execution path. Usually, when we use one construct to support two different requirements, it fails to be ideal for either.

      I suspect that an elegant solution to this problem could be based on the core concept proposed here by CynicTheHedgehog, viz.: Organize the complex attribute data associated with each file system object by using a multicolumn table, containing various object capabilities and properties. And stop trying to encode these properties in a single name string, plus a chunk in a path variable.

      Of course, this would require a new file system paradigm, and might have a tiny impact on existing distros. :) But the issue is worth some discussion.

      --
      -- We all have enough strength to endure the misfortunes of other people. La Rochefoucauld
  93. But what about libraries? by kanelephant · · Score: 2, Informative

    I use this method and it works nicely for binaries/paths. But it does not work well for shared libraries because ldconfig does not follow symbolic links. Currently I have to add each directory to /etc/ld.so.conf. Is there a good way round this?

    Or am I just being stupid?

    -K

    1. Re:But what about libraries? by HalfFlat · · Score: 2

      My home Linux system is based on the Linux From Scratch documents, with the added organisational principle of having every /usr destined package in its own directory, and links made into the /usr tree.

      This has worked fine for me with ldconfig, which reports itself as being version 1.9.9. My /etc/ld.so.conf doesn't require an entry per directory at all - provided there are symlinks from (say) /usr/lib/libblah.so to whereever the library really is.

  94. $PATH is the problem by Animats · · Score: 2
    Perhaps executable-searching should search all subdirectories of a named directory, like Perl module searching does. Making this work fast would require a cache, but that's well understood. Then it wouldn't be a big deal where an application was.

    Similarly, applications should look for their own resources anywhere in the indicated subtree, so that relative position within a package doesn't matter.

  95. FreeBSD by sporty · · Score: 2

    Perhaps the otehr BSD's do this, but I never use them. I like the fact that the package management, via /usr/ports and pkg_add puts all non-core, not part of the distribution in /usr/local.

    Either that or for big things, /usr/www, /usr/java, /usr X11R6. My path rarely grows as that happens very rarely taht a new /usr dir is added.

    What I like best is if I just rm -r the /usr/local dir, all my installs on the base system are gone. I have a clean system again. with RPM, it screws up a bit, which I'm not too happy about, in terms of removing packages. A good rm -rf works wonders :)

    -s

    --

    -
    ping -f 255.255.255.255 # if only

  96. That wasn't the point... by devphil · · Score: 2
    The unix system doesn't really dump all the files in /usr/bin. These are, almost without exception, executable files.

    Well, duh. He wasn't suggesting that his password file is now /bin/passwd and his data sink is /bin/null and his POP3 spool was /bin/INBOX.

    Yes, everything in /usr/bin is an executable. (Hence the bin, because they're all binaries.) That's true on every Unix.

    And on most Unixes, /usr/bin is for core applications, graphical binaries go in (say) /usr/X11/bin, statically-linked binaries go in /usr/sbin or /sbin, etc. There is some breakdown based on the purpose of the executable.

    But under Linux -- and I think this is what the complaint revolved around -- all of the X11 and other graphical things get dumped in /usr/bin under most distros. Including the "helper apps" that no user runs directly. It's a mess, it's a pain, and it slows down PATH hashing.

    They seem to be forgetting what GNU's "libexec" directory is for, among other things.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  97. The XEmacs Way by psamuels · · Score: 2
    but as one user pointed out maybe we need a smarter shell to deal with recursive PATHs.

    [[ First of all, note that it's not just the shell - the C library also makes use of $PATH in its execlp() and execvp() functions, so that would have to be updated as well. Not a problem, if you have the ear of a glibc developer or are willing to subject yourself to LD_PRELOAD hacks.... ]]

    It might be instructive to note that XEmacs dealt with precisely this issue. The original GNU Emacs has lots of bundled LISP packages, and they used to come in one colossal directory. The XEmacs people started splitting things into their own dirs, but Emacs has a variable 'load-path' that works like $PATH for elisp files. Eventually they came up with a function that scanned the lisp dirs and made a list of subdirs - then used that function to build 'load-path' at runtime, when you start XEmacs.

    Kind of clunky, but the same could be done with /etc/PATH or whatever the script might be called for your shell and your OS.

    Just a thought....

    --
    "How can you claim that you are anti-crack, while still writing a window manager?" — Metacity README
  98. Yup, HP-UX is much worse. by Medievalist · · Score: 3, Interesting

    While Red Hat is certainly a major offender, HP-UX 11.0 has device log files in the /etc hierarchy, and the runlevels are still under /sbin, and every "optional software" dumping ground ever invented (share, contrib, usr/local, opt, and more) as well as a totally brain-dead depot system that makes RPM look inspired.
    I've said it before - and I'm not the first or last to notice - HP-UX is a *train wreck* of a unix. HP puts Fibre Channel controllers that are necessary for the system to BOOT in the /opt folder!
    --Charlie

  99. And how about... by hattig · · Score: 2
    Taking the "/" is the root of everything... and assuming Linux

    The OS is stored in /Linux-$VERSION-$VENDOR (e.g., /Linux-2.4.14-RedHat) - this allows you to have multiple OS directories for quick and simple upgrades. The OS would, of course, include the kernel, modules, etc - the essentials.

    Common commands should have a directory, lets call it "/Commands", however, it could be "/C" (ooh, very Amiga-like, the OS that had a decent directory structure from the start - we could learn a lot from that) or "/bin" for the die hards. This would hold utilities, tools, etc - command line stuff.

    Applications would be stored under the "/Applications" directory, each application would have its own directory, and in that directory you could store different versions of the software. All software could be configured to run in a chroot'd environment for security. Software could come as a MacOSX style package.

    Mount other drives in the "/Drives" directory. Mount devices in the "/Devices" directory, or in the "/Linux-$VERSION-$VENDOR/Devices" directory, depending on how you want to define the scope of the OS.

    Sure, this needs a little work. But it is a lot more understandable and usable than the current system.

    So a simple example would have:

    /
    /Linux-2.2.6-SUSE
    /Linux-2.2.4-SUSE
    /Commands (or /Tools or /Utilities or /Core?)
    /Devices
    /Drives
    /Drives/CDRom
    /Drives/Floppy
    /Drives/DVD
    /Applications
    /Applications/Emacs
    /Applications/Emacs/Emacs-21.1.package
    /Applications/Emacs/Emacs-22.1.package
    /Applications/X11R6
    /Applications/X11R6/XFree86-4.2.2.package
    /Applications/KDE
    /Applications/KDE/KDEApps
    /Applications/Gnome
    /Applications/Gnome/GnomeApps
    ...

    (of course, you might want it all lower-case in a case-sensitive file system!).

    1. Re:And how about... by hattig · · Score: 2
      Erm, and to make a few points clearer:

      /Home would of course hold user filespaces. These would have their own /Applications and /Commands directory structures as well.

      I forgot "/Libraries" for system libraries that are not part of the OS (e.g., libncurses) OS libraries would go into "/Linux-$VERSION-$VENDOR/Libraries of course.

      So yes, these are simple remappings of the current directory structure.

      /opt --> /Applications
      /bin --> /Commands
      /sbin --> /Linux-2.4.14-SUSE/Commands
      /lib --> /Linux-2.4.14-SUSE/Libraries
      /usr/lib --> /Libraries
      /usr/bin --> /Commands

      and so on. It doesn't take much thought to get everything sorted out. Sorry about POSIX, but you could have a system that did run-time remapping of the old directory names to the new ones, or just invisible (in GUI filesystem apps) symlinks as above.

  100. dpkg + Local compile integration mini-HOWTO by psamuels · · Score: 2
    With both rpm and apt, if you compile a library from source, the package manager won't consider said library to be installed.

    True. The usual workaround (or "fix" if you want to term it such) is to apply the Debian diff to your source tree (which if it's a different version may or may not apply cleanly, but often works fine), then use 'dpkg-buildpackage' to make a binary .deb from it, then install that.

    Can't customise the build? This depends on the packaging job, but often you can run the './configure' step or whatever, then have dpkg-buildpackage take over from there, using the '-nc' ("do not clean") option. YMMV. There are other ways to trick 'dpkg-buildpackage' too, again depending on how the package was packaged.

    Note that you also have to make sure 'apt' doesn't try to overwrite your custom-compiled package with an "upgrade" - normally done by marking the package "on hold".

    --
    "How can you claim that you are anti-crack, while still writing a window manager?" — Metacity README
  101. Re:The Alternative? (do we actually need one) by Znork · · Score: 2

    True. Now explain that to the users. Then explain it to some million linux distribution newbies.

    I dont want to do that. But you can. If you want to.

  102. Interesting solution by iamcadaver · · Score: 2, Interesting
    The are a few guys on LFS's blfs-discuss mailing list that suggest that they modified the 'install' program to install each package as a user with the base package name.

    On first inspection, it of course makes identifying and finding what put whom where ludicrously simple.

    find / -group KDE

    On second reflection, it adds a finer layer to group/user mangement, and administrative delegations.

    --
    Before I part with'em: two pennies weigh ~4.996+/-0.014g, have a zinc core, and the face of Lincoln. You can keep 'em.
  103. Dumb Dumb Dumb by augustz · · Score: 2

    Listen, Microsoft went down this package management road and discovered that, hey, it makes more sense to waste a little space duplicating shared libs and simply install programs into their own directories....

    This is one of my biggest pet peaves. This LSB File System Standard serves no really useful purposes and causes endless heartache for whoever is interested in simply being able to use their system, and remove stuff with an rm -rf.

    Having appache install itself in /usr/local/apache is really nice if you are used to it spreading itself 10 ways to sunday.

    1. Re:Dumb Dumb Dumb by kinkie · · Score: 3, Insightful

      it makes more sense to waste a little space duplicating shared libs and simply install programs into their own directories....

      Shared libs are not only about wasting disk space (which we usually have plenty of). They're much more gained from them, namely sharing RAM by mapping common code pages into different processes' address spaces.

      Think if you had a duplicate libc in every damned process running in a system.

      --
      /kinkie
  104. Specialize! by rice_burners_suck · · Score: 3, Insightful

    The biggest problem with Linux is, in my opinion, the fact that people try to solve all the problems of the world with a single solution. Red Hat is a worthwhile cause, but I don't think a single distro can handle every possible use of Linux. I thought Linux was about choice. In that case, there should be many smaller distributions aimed at specific (or at least more specific) purposes.

    No, I'm not a luser, nor am I a newbie. I know that there are countless distros out there, which fit on a single floppy, six CDs, and everything in between. (I've purchased so many distributions for myself and for others that I'm drowning in Linux CDs.) But everybody and his uncle uses Red Hat. (I personally like SuSE a LOT better, because it is far better organized in my opinion.)

    Many common problems make the file system layout and package management suck. I don't mean to start a flamewar, but this problem is far smaller on FreeBSD, where the file system layout is a lot better organized than that of a Red Hat Linux system. (It's even better organized than a SuSE system.) The ports and packages collection, which works through Makefiles, makes installation and removal of many programs very easy, with dependency checks. Unless I'm imagining things, it does find dependencies that you install manually, as long as they're where the system expects them. However, glitches still exist, mainly in the removal of software, that require user intervention to remove some remaining files and directories.

    When it comes down to it, I think that package management systems--whether they're Debian's system, RPMs, or the *BSDs' ports and packages--are supposed to serve as a shortcut for the system administrator, who still knows how to manage programs manually. The Linux community seems to have forgotten this, and expect package management to be a flawless installation system for any user with any amount of experience. Unfortunately, this is not the case, and it would be extremely difficult, maybe impossible, to make such a system. I believe this doesn't matter.

    Skilled admins need control and flexibility over their programs. This is especially true for critical servers, but also applies to workstations. If the setup they want can be achieved with a package manager, they'll use it. If not, they can opt to build the program from source, or, if this installation takes place often, they might make their own package, perhaps customizing paths or configuration files for site-specific purposes. A well-organized hierarchy is very important.

    Novice users are very different. They just want to install this thing called Linux from the CD and surf the web or burn some MP3s. For them, the solution isn't a great package management system, because a novice user probably doesn't know where to obtain programs. In some cases, there are hundreds of similar programs to choose from--novices can't handle all that choice! The solution for them is a distro that supports a very specific set of programs, and supports them well:

    • Everything should be managed through clickable graphical dialogs. Enabling web serving or whatnot would take one click on a checkbox.
    • The installation would be extremely simple:
      • Where possible, there are no choices. You simply install the distro and get all the "standard" programs, precompiled, preconfigured and ready to use.
      • During installation, a preconfigured image of a 500 megs (or so) partition would just be copied verbatim onto a partition on the user's hard drive.
      • Another partition, taking up the remaining available space, would be mounted on /home.
      • Installation could happen in 5 minutes flat.
    • A single desktop environment would be present. Novice users shouldn't have to try ten different window managers and docking programs and whatnot. Choose something and put it on this distro. If you want to support multiple desktop environments, package multiple distros.
    • The same rule holds true for all programs that would come with the installation. Instead of making one huge distro that supports everything from 10,000 text editors to biological analysis programs, make 10 different distros. One would be for "Home" use and would include stuff like a word processor and spreadsheet, a banking program, web browser, email client, calendar program, MP3 player, video editing software, and whatever else you want to include. These don't even need to be 100% free software. Put some quality programs on the CD and charge for them.
    • To make a long story short, limit the user's exposure to problems. Every choice you present to the user is a possible problem. We're talking about people who don't know where the "any" key is for crying out loud.

    Finally, I would recommend that in the spirit of giving back to the community, any admin who makes his own packages should submit them back to the developer for distribution to others. (Unless these packages are designed for site-specific purposes, of course.)

    Oh yeah, and I almost forgot the obligatory "oh well."

    1. Re:Specialize! by rice_burners_suck · · Score: 2

      During installation, a preconfigured image of a 500 megs (or so) partition would just be copied verbatim onto a partition on the user's hard drive.

      Come to think of it, I honestly can't figure out why, during installation, thousands of files need to be individually decompressed and copied to their location, or even built by the installer. Why does it take about an hour to install Linux?

      Linux can be a very successful system that "doesn't suck." It only takes a little bit of vision. Developers out there are so caught up in the details that they have lost sight of the forest for the leaves. Take a look at BeOS. Now here is an example of people who thought correctly. First and foremost, installation took 7 minutes when using a quick CD-ROM drive. (Probably 32X or something like that.) There weren't many questions or choices.

      Of course, there were several big problems with BeOS:

      • Lack of applications for the home user.
      • Lack of widespread support by developers.
      • Lack of drivers for popular hardware.

      Each of these problems contributed to the severity of the others. Lack of applications and drivers meant the userbase remained small. Lack of users kept developers from writing drivers and applications.

      Fortunately, Linux doesn't have these problems. There are drivers for nearly everything. Hardware manufacturers that don't provide drivers are run by idiots. There is widespread support from big companies. (Just the other day, I read that a group of 40 companies, including Boeing, are building Linux clusters and running MSC computational fluid dynamics programs, yielding results faster and more cost effectively than on Cray supercomputers.) There is a huge user base. The user base is constantly growing as people become disenchanted with Microsoft. In short, Linux has a huge advantage.

      Unfortunately, with systems being relatively hard to install, maintain and run (by NEWBIES --I'm not talking about experienced computer geeks), and with thousands of choices in applications and whatnot, Linux isn't offering a very good solution right now, and that's because the developers have lost sight of the forest, as I've said before.

      Now back to my original topic: Why should the installer do so much work? If everything is prebuilt and placed in an image of a partition (a single file on the CD, rather than many files that need to be built during installation), leaving room for the user to expand, and this image is copied directly onto the user's hard drive during installation, the system wastes MUCH less time building inodes and performing file system housekeeping operations. It would be like copying a single file, rather than a ton of small files, and from experience, I can tell you that copying one 100 meg file takes far less time than copying 10,000 10k files. The result would be an installation that takes almost no time at all.

      In case you're wondering, parts of the filesystem that aren't predetermined by the distro (like the /home directories) would be on a separate partition. The installer would first create the partitions. The predetermined one would be a predetermined size. All remaining available space would be on a separate partition for the use by the user.

      I'm not saying this needs to be implemented. I'm just saying, "Think of the possibilities," and, "minimize the work." Oh well.

  105. How? by be-fan · · Score: 2

    Its incredible that the current UNIX file structure actually works. There are so many namespace conflicts that it must be an act of god that keeps it moving. Take, for example, /etc. Tons of different programs park their config files in that one directory. The take every user's root directory. There are so many .this_stupid_program files in their it's ridiculous (plus RPM doesn't remove them). Then take /bin. All these different programs sharing a single namespace. IMO, the evolution of the UNIX filesystem should take several steps:

    1) Get rid of the current library structure. All libraries should be explicitly managed by the system. If a program wants a shared library loaded, it has to install it at install time through special APIs. That way the system make several improvements, such as prelocating common libraries so they don't have to be relocated at run time, manage conflicts between libraries, since the information is explicit and not dependent on the filesystem, get rid of the need for ldconfig, and allow more complex security/sharing policies than available with /lib and /usr/lib.

    2) Revamp the include file namespace. Include files from so many libraries should NOT be sharing the same namespace. 'include' shouldn't even be part of the standard system, it should be an implementation detail left to compilers.

    3) Revamp the configuration system. Again, no more allowing programs to directly access the filesystem. Configuration stuff should go through special APIs (like the Windows registry). Instead of a binary database, however, the registry should be a tree of text (probably XML) config files. This would also fix another problem. It would be much easier to write a unified configuration editor. Since there wouldn't be dozens of config file formats lying around, one could write a program that could read a standard XML format and allow the user to edit it.

    4) Revamp application installation. That's the biggest problem with current OSs (even given package management like RPMS). Apps simply don't work right. Removing an RPM, for example, doesn't remove all traces of a program. Upgrading an application with a slightly different one is very difficult. The other day, I was trying to install TexStar's optimized KDE RPMs for Mandrake. Of course, I couldn't use RPM -uvh, since the they have two different tags (3mdk and 2tex). I had to remove the KDE rpms with --nodeps (which makes me cringe each time HOWTO suggests doing it) and install the new ones. Of course, it didn't work right, so I had to uninstall the whole KDE installation, reinstall with the tex RPMs, and reinstall all the apps. Of course, by then I had tons of stale config files lying around.

    5) Paths. Paths are a huge problem. Just the very fact that a crashed program dumps core onto whatever happens to be the current directory shows how badly the UNIX hierarchy was thought out (or maybe how much its been streched beyond its original design). First, no programs should depend on explicit pathnames. Everything should go through at least one layer of abstraction. Maybe read paths for the standard config mechanism.

    --
    A deep unwavering belief is a sure sign you're missing something...
  106. 2000 files in /usr/bin? Not bad... by Pinball+Wizard · · Score: 2
    By way of comparison my Windows 2000 system has 1,770 objects in WINNT\System32, 27 of which are directories(with even more files) and the rest are files, mostly .dlls(binary library files). However, it doesn't really matter to me because Windows keeps track of all these in a logical way and cleanly handles installation and uninstallation of applications.


    The only problem I run into lately on my Unix systems are calls to the wrong versions of libraries. Windows used to have this problem but has since taken care of it by allowing multiple versions of the same dll to coexist.


    The thing that Windows does well that Linux package managers haven't even attempted is that it will not allow programs to be installed onto the system unless they meet certain requirements. Mainly for a program to get installed, there has to be a way to cleanly uninstall it. Otherwise it doesn't get installed.


    If dpkg could do this, I'd be very happy. Not just for things bundled into a nice little Debian package, but for everything that gets installed into my system. If it gets installed, there should be a clean way to uninstall. Then, 2000 programs in /usr/bin wouldn't really matter that much. The system could deal with it.

    --

    No, Thursday's out. How about never - is never good for you?

  107. MacOS X - by phandel · · Score: 2, Interesting

    [localhost:~] local% uname -a
    Darwin localhost 5.1 Darwin Kernel Version 5.1: Tue Oct 30 00:06:34 PST 2001; root:xnu/xnu-201.5.obj~1/RELEASE_PPC Power Macintosh powerpc
    [localhost:~] local% ls -l /bin | wc -l
    32
    [localhost:~] local% ls -l /usr/bin | wc -l
    450
    [localhost:~] local% ls -l /usr/sbin | wc -l
    113
    [localhost:~] local% ls -l /sbin | wc -l
    58

    Not too bad, eh?

  108. MacOS X? by Pseudonymus+Bosch · · Score: 2

    How does MacOS X manage application files? It comes from BSD but, as far as I know, installing a Mac application is just drawing a folder on to the file tree.

    --
    __
    Men with no respect for life must never be allowed to control the ultimate instruments of death.
    GW Bu
  109. What about Symlinks? by sconeu · · Score: 2


    The late (un?)lamented SCO OpenServer pretty much threw stuff into /opt/{incomprehensible path}, and practially everything in /usr/bin was symbolically linked over there. Even stuff in /etc was symlinked (a bad idea, IMHO). But for path simplicity, you install in /usr/share/package, and install symbolic links in /usr/bin.

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  110. Another reason by Nailer · · Score: 2

    Doing this better allows for the installation and maintenance of change root services.

    Something the FHS seems to think is an unusual case, soemthing I personally see as the reason I use Unix for servers despite its other flaws.

  111. Oh, okay ... I guess all you need to do is define by Nailer · · Score: 2

    I guess all you need to do is
    * define `add on'
    * define` extra'
    * define `essential'
    * define `core'

    In a way more than 10% of OSS Unix users wil agree on. Good luck. The FHS uses whether a system booted without /usr will be runnable and recoverable to determine whether files should be under / or /usr.

    But they don't bother defining what's optional (leading to the pathetic situation of having ten or different sets of KDE packages for various Linuxes).

    I don't consider a workstation to be functional unless it has a GUI. A set top box might have an TV tuner app and DVD player as an `essential' piece of software.

    If they get to put these apps under /, and other distro's have to put them under /usr, yo ucan give up on the idea of knowing where apps are on a Unix system. Which defeats the pourpose of the FHS.

    My $0.02 says the FHS has failed miserably (Rusty removing the long-awaited and long debated and finally resolved /media proprosal without anyone's consultation was the last straw).

    Fuck it - let's all organize out system Dan bernstein style.

  112. Old news. by Arethan · · Score: 2

    I've bitched about this for years.
    I've even put an entry in my slashdot journal about the problems that are keeping Linux out of the real spotlight.

    Shitty package management/lack of app-installers (RPM and apt-get aren't quite InstallShield replacements), bad filesystem design (/usr/bin/all-my-execs), no lossless HD repartitioning utilities (none that I've found anyways), lack of good journaling filesystem (ext3 seems to have fixed this), shitty printer-driver model (text files describing my printer's abilities are hardly flexible enough to remove the need to recompile lpd), bad video model (Xservers & Xclients streamlining all of my gfx operations? come on!), nearly everything you get has to be compiled (GPL is great, but just because you need to make the source available doesn't mean you need to make the source the way you distribute it. GCC should not be a required option), no windows compatability (Wine seems to be getting this under control).

    I've kicked this fucking horse right into the ground. Everyone bitches about it, but everyone also agrees that starting their own distrobution isn't going to solve the problem. Linux is a great server, but an ultimately shitty desktop. Believe me when I say that I know from experience. It's been my ONLY desktop for over 2 years.

    I switched to Linux to avoid having to reinstall the OS every few months, yet I still find myself doing so simply because there's been a huge kernel change, or my RPM dependancies are completely fucked from trying to install a non-RedHat created RPM. Or maybe I've "configure; make; make install;"ed my way into a full hard-drive, with no idea of what files belong to what application. There's a reason that I always configure apache to install into /opt/apache, it's because I don't want my applications to get their fingers all into each other! Not because I'm a neat freak, but because I can't fucking uninstall half of them without doing so!

    If it's an OS upgrade, then make it an RPM, or make it an apt-get package. If it's an application, then it needs to have it's own installer bundled with it, and it needs to put itself into it's own fucking dir tree, so when the installer DB pukes, I can still tell what files belong to what app.

    I'm putting together a new linux distro from LinuxFromScratch.com, and developing an application installer, and hopefully a new paradigm of how Linux applications are distributed. What wagon are you on?

  113. Re:Problems with directory per application by Todd+Knarr · · Score: 2

    On point #1, objection. Binary names can clash, just not in packages used at the same time. Eg., if I have a foomatic program for both KDE and Gnome desktops, I want both versions of foomatic installed simultaneously, say in /usr/bin/gnome/foomatic and /usr/bin/kde/foomatic. I'll only put one of /usr/bin/kde and /usr/bin/gnome in my path at once, so there's no conflict at run-time.

    There's even a sensible reason for having the same name. Suppose foomatic is the same program under both desktops, but the Gnome version's built with the Gnome/GTK toolkits and the KDE version's build with the KDE toolkits so that each version has the right look-and-feel for the desktop it's used with.

  114. This makes no sense by Adam+Wiggins · · Score: 2

    First of all, he keeps blabbing about "thousands of directories under /usr." I don't know about you guys, but on every Red Hat system I've ever used, "ls /usr" produces about 10 directories.

    If he's referring to /usr/bin - well, that's just plain silliness. Of course there are binaries (and symlinks to binaries) in there. Does he expect us to have a $PATH that is 25k long?

    There are a lot of things that I would change about the filesystem layout, and about Linux/UNIX in general. This is not one of them.

  115. Complete Mess by ffatTony · · Score: 2

    At work we have software in /opt/- (A more windows-ish way). Some directories in opt are complete messes with little or no structure at all ( e.g. Netscape ldap, weblogic servletengine, etc ). I am vehemently opposed to this. I do my best to preach the benefits of GNU Stow every time a $PATH related confusion arises, but they've fallen on deaf ears thus far.

    the first thing I really noticed about Linux after taking the plunge was that things were organized in a far superior manner (for the most part). I like having my PATH be $HOME/bin:/usr/local/bin:/usr/bin:/bin and at home it is. At work (HPUX) even /etc contains binaries, what a mess.

  116. Re:WRONG by hexix · · Score: 2

    you're an idiot. first of all removing is not the same as purging.

    and those files are configuration files. Now, the reason removing is not the same as purging is because purging WILL remove those.

    Ooooh, oh no, I guess he does know what he's talking about, huh?

  117. my /usr/bin by ultrapenguin · · Score: 2, Insightful

    only has 380 files in it, and I know exactly what each one of those files is for.

    I don't know about mosfet's problems, but I have no problem managing my filesystems.

  118. 1 datum 0 data by roystgnr · · Score: 2

    Would you care to share some of that overwhelming evidence? I haven't seen it.

    I simply haven't seen much data to make me worry about any of this. In the time I've used Linux, I've seen one friend's ext2 partition get corrupted beyond repair, and I've not seen anyone's RPM database get corrupted at all.

  119. Not seeing the forest for the trees by nathanh · · Score: 2

    Distributions are already doing the right thing. For example, with Debian the ghostscript package has:

    • Arch independent data in /usr/share/gs/
    • Documentation in /usr/share/doc/gs/

    XMMS has:

    • Arch specific plugins in /usr/lib/xmms/
    • Arch independent data in /usr/share/xmms/

    Application specific directories would be a nightmare for managing partitions. You would have

    • /opt/kde/share/
    • /opt/kde/lib/
    • /opt/xmms/share/
    • /opt/xmms/lib/
    • /opt/gs/share/
    • /opt/gs/lib/

    This might be OK for a single home user with a single large "/" partition. But it's the wrong thing for system management. It's mixing the system management in with the package management. Imagine trying to mount all the "share" areas as read-only and share one copy amongst a heterogenous network of x86, PPC, Alpha, Sparc. Perfectly possible with FHS due to the definition of what the "share" areas are. This wouldn't be possible if MOSFET's /opt/package scheme was being used.

    Package management is a complex problem. There are many ways to address this problem. Either by using package management systems (Debian, RedHat) or by putting applications in /opt and using symlinks (depot-based systems) or whatever. The package management technique has the huge benefit of being able to solve packaging problems without influencing the filesystem layout.

    Now, MOSFET does raise one very interesting point. Distributions are already going down the path of /usr/lib/package/ and /usr/share/package/. Why aren't they going further down the path of /usr/bin/package/? Maybe because most packages only have a single binary in /usr/bin. Maybe because PATH handling is real difficult. Either way I think this is the only valid argument he raises.

    Keep in mind that MOSFET's arguments aren't new. They were debated when the FSSTND was first written and when the FHS replaced it. The /opt/package argument is weak and it lost out to the cleaner FSSTND/FHS layout both times.

  120. If he adhered himself... by PigleT · · Score: 2

    Agreed.

    I also don't know quite what he's complaining about. "Forced to use the package-manager"? Well, big furry deal. Better that there is a decent manager to be used, and that you use it, than that you have some kludgy mess where some files are owned by packages and some aren't.

    This is, after all, what /usr/local/ is designated for. Stuff that really can't be packaged somehow (like, er, what?) can be built from source with --prefix=/usr/local/stow/, and then stowed from there into /usr/local, *where it belongs*. The entities in your PATH would be nothing but symlinks, *and* under the control of a package manager (stow is one such beast), *and* would allow for the arch-independent files to be easily shared amongst machines. The filesystem *can* be its own package-manager, but you need the functionality of stow around it.

    I get the feeling that Mr Mosfet really doesn't have half a clue what he's talking about, and is just an old sales-droid unix-head who hasn't bothered reading either the FHS or `man dpkg` and doesn't know how to admin a box tidily.

    And incidentally, his history is fscked as well: Debian has lead the way in FHS-compliance, *followed* by RH. (Cf how /usr/doc became /usr/share/doc in debian, followed by RH.)

    --
    ~Tim
    --
    .|` Clouds cross the black moonlight,
    Rushing on down to the circle of the turn
  121. Re:1 datum 0 data by dillon_rinker · · Score: 2

    Here's my evidence:
    Computers break.
    Bosses want them fixed RIGHT FREAKING NOW.

    Here's your anecdotal evidence:
    "My computer didn't break."

    Read my other comments; it boils down to making a system as self-documenting as possible so that the poor schmuck who has to fix it has as easy a time of it as possible.

    You are assuming that because you personally have never observed a problem with this software then the problem does not exist. I, on the other hand, am assuming that this software is like all other software I've seen - it is imperfect. If I am to be responsible for administering a system, I want to be prepared for every part of it to break.

  122. Re:Why when you have a package manager? by Chanc_Gorkon · · Score: 2

    This is NOT adequate. Yes it let's you uninstall stuff, but it does not get EVERYTHING! RPM generally get's most stuff except for user generated things that are dumped in their home directories. Documents and settings are generally left alone. Try this on both a windows system and a Linux system.

    1. Look at free drive space using a appropriate command on each system ( yeah I know, highly inaccurate on windows since drive contents goes up and down due to swapping but good enough for this demo )

    2. Install Mozilla on both Windows and Linux (use RPM or DEB based system).

    3. Browse a bit on both.

    4. Uninstall package/program using appropriate util.

    5. Check drivespace.

    I know the above is one program that doesn't drop a whole bunch of crap all over the drive in Windows, but chance are that the add/remove program util will miss something. I chalk most of this up to lazy programming practices. Also, Microsoft has a long history of letting programs update things and dumping things into both the Windows directory and the Windows/system directory. Microsoft said you weren't suposed to do it then several Microsoft programs did it themselves and now most do it to make sure you have the right levels. This main archetecture flaw is the main reason behind DLL hell. It's also the reason add/remove never gets everything. If Microsoft fixes this problem, then they may have a better system. Personally I think they can't fix it. It's been getting better, but Windows ME was nto as stable as they said it was going to be. Maybe XP is. I don;t have it nor do I use it at work yet so I have no clue. BUT I think alot of folks are asking for things to be like they were "back in the day" and we have to face it that they will never be like that. Code reuse force the use of shared libraries and such so it's a pain to do it the OLD way. Granted I think that APT/deb is the best, but Apt-RPM ain't the best and BOTH need some refinement. RPM more then APT/DEB.

    --

    Gorkman

  123. This does not account for commercial apps by Skapare · · Score: 2

    The FreeBSD (and other BSD) filesystem layout still fails to accomodate commercial apps. In fact the whole ports system defaults to a path (and some programs fail if you try to change things) which collides with local apps. What is important to me is to keep locally selected applications separate from locally developed applications, and BSD simply does not do this. One choice (and not the only one, but BSD doesn't have any) is to put the locally developed ones in /usr/local and the ports and commercial apps in /opt (ooh, you might have to do mkdir). Now that's not the only way to choose to do it, and I'd certainly consider a different choice, but I want to see some decision, and see PATH defaults to include that choice.

    Linux suffers from so much independence of packages that they get installed anywhere. What I think really needs to happen (on BSD, too) is that every package (ports included) needs to strictly follow local policy about where to be installed (and the installer program enforce this). If I tell it to be installed in /usr/foo then it should function just fine from there, and further, if I go rename /usr/foo to /usr/bar then what is installed must continue to function just fine that way. If I replicate the tree to a new system under a different directory, and access it that way, it should work there. Part of the problem is it is not easy to do so (a program might have to find its resource files ... where are they? ... how will the program know from which directory it was executed so it can find the matching set of resources?).

    --
    now we need to go OSS in diesel cars