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?

612 comments

  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.
    1. Re:Why not go the extra step by Angry+White+Guy · · Score: 0

      That's what I thought symlinks were for. Put everything in separate folders, then link what you need.

      Avoid Software Bloat: rm -rf * daily

      AWG

      --
      You think that I'm crazy, you should see this guy!
    2. Re:Why not go the extra step by Anonymous Coward · · Score: 0

      Well, the problem is that binaries need to be in the $PATH to be really usable.

      Data files on the other hand should go in a program specific directory.

    3. Re:Why not go the extra step by -brazil- · · Score: 1

      Which, of course, slows down the system a godawful lot, since it means one extra disk seek for just about any file access.

      --

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

    4. Re:Why not go the extra step by Angry+White+Guy · · Score: 0

      I spend the extra money and buy some fast disks and ram. I would rather have my filesystem legible than optimized to the hilt. One nanosecond of fileseeks compared to my time as a sysadmin, that's an easy decision. And it's only one extra disk seek for the initial file, which is usually a console command, and my users don't have shells. Everything else has absolute paths, which is a hell of a lot better then checking a six mile long path statement. Get your head out of your ass and join the real world.

      AWG

      --
      You think that I'm crazy, you should see this guy!
    5. Re:Why not go the extra step by -brazil- · · Score: 1

      Sorry, but disk seeks take time in the millisecond range, and it's not something that has gotten much faster with recent disks. And it's NOT only one disk seek when you add in shared libraries, configuration and data files, and possibly access to other applications with which the program interfaces. For a large application, it could make the difference between a startup time of 5 seconds and 10 seconds, which is quite a lot.

      --

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

    6. Re:Why not go the extra step by Angry+White+Guy · · Score: 0

      Hmm, a shared library constitutes a disk seek regardless of symlinks. Absolute paths also cut this down to a minimum, so I'll wait the extra second, especially if it minimizes the amount of garbage data left on my disks after an uninstall.

      AWG

      --
      You think that I'm crazy, you should see this guy!
    7. Re:Why not go the extra step by -brazil- · · Score: 1

      No, the symlink requires one extra disk seek, possibly two if the link text is too large to fit into the link's inode. And absolute paths won't help at all, not if you insist on symlinking everything.

      --

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

    8. Re:Why not go the extra step by sbrown123 · · Score: 1

      If you uninstall something, you now have to additionally remove any symlinks that were pointing to uninstalled files left around. Symlinks would make the filesystem harder to manage and thus defeat your idea.

    9. Re:Why not go the extra step by ShavenYak · · Score: 0

      Well, the problem is that binaries need to be in the $PATH to be really usable.

      Sure, for command line stuff, you want your binaries in $PATH. On a 'desktop' distribution, though, what would be wrong with applications not being in the $PATH, but instead having all the menu items point to the correct location? Yeah, it would make it harder to launch apps from an xterm - but a lot of users don't care about that, and those that do could modify their $PATH or make some symlinks for stuff they use often.

      --

      Hey kids, there's only 5 days left 'til Yak Shaving Day!
    10. Re:Why not go the extra step by Angry+White+Guy · · Score: 0

      Finding broken symlinks is a relatively easy task, compared to a binary which may or may not run a program left on my disks. Broken symlinks show up red on my terminal, whereas a binary that has all support and library files removed looks the same as one that's active.

      --
      You think that I'm crazy, you should see this guy!
    11. Re:Why not go the extra step by Angry+White+Guy · · Score: 0

      I don't symlink everything. I symlink commands and files which are mostly run from the command line, which only a few people can run. Everything else has absolute paths, is run as a service, or otherwise does not need to be in the users path. My systems run just fine, my disks are clear, and my employers happy. And my /bin,/usr/bin, and /usr/local/bin are uncluttered. How much garbage do you have on your disks?

      AWG

      I'mg guessing your biggest problem is /vmlinuz, but that's only my professional opinion

      --
      You think that I'm crazy, you should see this guy!
    12. Re:Why not go the extra step by -brazil- · · Score: 1

      Sounds different to "Put everything in separate folders, then link what you need, which is what I was arguing against. And sounds like an awful lot of work for the benefit of "clean" disks (for a highly arguable definition of "clean").

      --

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

    13. Re:Why not go the extra step by zap42hod · · Score: 1

      > 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)?

      uh, isn't alot of stuff in /bin/ used by other programs (scripts) ?

      maybe you know something that could beat the central locations for executables and wrappers + $PATH for the simplicity of invocation ?
      + in any decent *x OS there are means to aquire information on the file-package relationships. why on earth should all this be described in filesystem structure?

      I might be overlooking something here though.

    14. Re:Why not go the extra step by zap42hod · · Score: 1

      oh I really should read more than one comment before going and stating the obvious :)

    15. Re:Why not go the extra step by sbrown123 · · Score: 1

      >>Broken symlinks show up red on my terminal

      Do they also blink and make a tune? Yeah, I guess you could just simply scroll up using the green scroll bar and press the yellow, circling button that reads : "I had no idea there are people using terminals that are not color coordinated".

    16. Re:Why not go the extra step by Anonymous Coward · · Score: 0

      Symlinks are awsome. It's a feature... Use it to you advantage!

  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?
    1. Re:Still new to GNU/Linux by CounterZer0 · · Score: 0

      You can compile most things with a --use-prefix=/path/to/executable , which I believe works with RPM too...I'm not sure about RPM's though.

    2. Re:Still new to GNU/Linux by Anonymous Coward · · Score: 0

      You think I want to look all over my hard drive for rot13 and banner? No, I do not. Stick everything in bin, you never know what you'll need to use once at some point before you die.

    3. Re:Still new to GNU/Linux by Rollo · · Score: 1

      rpm takes the --prefix=/your/install/dir parameter as well.

    4. Re:Still new to GNU/Linux by Neurowiz · · Score: 1

      I think the point is that you *should* know what is on your system - the concept of 'just throw it there in case you need it' is not something that professional Unix admins tolerate kindly. That's one of the things that has been seducing me towards Slackware - the concept of cleaning up my installation and having something clean and simple - rather than a bunch of binaries that 'I might need'.

      Besides - if I need something that bad, make; make install works perfectly.

      --
      Neurowiz
    5. Re:Still new to GNU/Linux by Stonehand · · Score: 1

      Only for relocatable packages, which isn't that many AFAICT -- many packages, after all, have compile-time-only settings for configuration and data files. So unless you're going to --rebuild them as well, you're out of luck.

      --
      Only the dead have seen the end of war.
  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 k4m3 · · Score: 0

      Who needs 2000 applications (aka entries in PATH) on one computer ?
      By the way, are you sure it's still a microcomputer ?

    2. 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?

    3. 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.

    4. 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.
    5. Re:The Alternative? by Anonymous Coward · · Score: 0

      Why the heck slopware need to access the system path anyway? Doesn't argv[0] (or whatever Windoze equivalence) tells you where you are running your code from ?

      It is a matter of a few lines of code to get to your directory path and all the application related files.

    6. Re:The Alternative? by chad_r · · Score: 1

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

      ... and/or $LD_LIBRARY_PATH, plus $KDEDIR, $QTDIR, etc.

      But as a Slackware user compiling things myself under /opt using --prefix=/opt/whatever, I haven't had much problem with this. I can always symlink if I need to, or set LD_LIBRARY_PATH specific to the application as needed.

    7. Re:The Alternative? by Oo.et.oO · · Score: 1

      AMEN!

      but as one user pointed out maybe we need a smarter shell to deal with recursive PATHs.

      i hate package managers as much as the next person, but i feel like a smart shell to expand recursive variables would help even though it does take _some_ control away from the power user just as package managers do. (aptget the exception).

      the symlink thing doesn't work for a lot of apps because they are too dumb to load libraries from their "home" directory if it's not where the binary is. (ahem, NETSCAPE)
      so the symlink thing doesn't complicate your PATH just gives you 2000 $APP_HOME variables.

    8. Re:The Alternative? by Anonymous Coward · · Score: 0

      ya still have 2000+ files in /usr/bin mr nonnewbie

    9. 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.
    10. Re:The Alternative? by pipacs · · Score: 1

      For many (graphical) applications, a desktop icon or menu entry should be enough - there is no need to add them to $PATH

    11. 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.
    12. 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!
    13. Re:The Alternative? by swright · · Score: 1

      the point is though, that the applications themselves live in good places and are easy to manage.

      It doesnt really matter having 2000 files in a directory the point is organisation of the important things [read: apps].

      apps in somewhere sensible and symlinks in /usr/bin or wherever sound like the best way to me :)

    14. 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
    15. Re:The Alternative? by Anonymous Coward · · Score: 0

      In a word, no. argv[0] does not tell you the full path for your executable.

    16. 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.
    17. Re:The Alternative? by Anonymous Coward · · Score: 0

      In a word, no. argv[0] does not tell you the full path for your executable.
      see: "man getcwd"

    18. Re:The Alternative? by -brazil- · · Score: 1

      Um... have you read the article? That's exactly the claim the author makes, and it's not even exaggerated much. At my university's system, /usr/local/dist/bin contains 1476 files. Even if each application accounts for several of them, that still means a few hundred applications, and a few hundred PATH entries would KILL the system, because each of these directories would have to be scanned to find an executable, which is a few dozen times slower than scanning only a few large directories.

      --

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

    19. 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.
    20. 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

    21. Re:The Alternative? by Anonymous Coward · · Score: 1, Informative

      In Windows (tested with 2k and XP, using NTFS), argv[0] does contain the full path to the executable. This is for console programs, using cmd.exe as the console (not command.com, which may act differently and should be ignored anyway due to crapness).

    22. Re:The Alternative? by -brazil- · · Score: 0, Offtopic

      Dunno about you, but I hardly ever launch programs through menus and never through desktop icons. If you work at the command line most of the time because of its greater flexibility, having to grab the mouse and wading through a menu or minimizing all the windows in front of a desktop icon just to start a program is actually much SLOWER than typing in the name.

      --

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

    23. 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.

    24. 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
    25. Re:The Alternative? by bkhl · · Score: 1

      Debian has a utility called stow, that does this. (Good for the lazy.)

    26. 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.

    27. Re:The Alternative? by cornflux · · Score: 1
      Is there such thing as a recursive PATH directive for executables? Like the ls -R or something for searching into subdirectories?
      Seems to me that this would be a security hazard.
    28. Re:The Alternative? by CaptnMArk · · Score: 1

      Maybe use the old VMS way where you define an alias for all commands that you need to use interactively.

      Scripts should use absolute paths anyway, no problem there.

    29. 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.

    30. Re:The Alternative? by dmelomed · · Score: 1

      The alternative is /package /doc and /command from DJB: Unix

    31. Re:The Alternative? by CaptnMArk · · Score: 1

      alias = command line alternative for desktop icons

    32. 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.

    33. Re:The Alternative? by Score+Whore · · Score: 1

      You are aware of the fact that no self respecting shell zips through the search path on every command invocation? They cache that particular information.

    34. Re:The Alternative? by -brazil- · · Score: 1

      No, and it wouldn't help, because it would still force the system to go through ALL those directories to find an executable in some cases (especially for a typo). In fact, it would be much, MUCH worse than hundreds of entries in PATH, because it would cause a lot of directories to be scanned that don't even contain binaries at all.

      --

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

    35. Re:The Alternative? by Isle · · Score: 1

      Still forces you to use a package manager. But if you place all files to an application under the same directory, you can remove it The Logical Way(tm): By deleting the directory..

      What you suggest sounds like a recipi for a broken links.

    36. Re:The Alternative? by -brazil- · · Score: 1

      Dunno the details, but that works only for positive results, not negative ones, right? So each typo still causes an exhaustive search. That, or you'd have to tell the shell explicitly to do it after adding a new executable.

      --

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

    37. Re:The Alternative? by Anonymous Coward · · Score: 1, Insightful
      i think it would be much better to have apps in separate directories and links to binaries in somewhere like /usr/bin (or /usr/links ?)

      so if you'll install the app you just unpack the app and make links
      and to uninstall delete app dir and invalid symlinks. it should be easy to automate both using simple shell script.

      sry for bad english (i'm not native speaker)

    38. 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!
    39. 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.

    40. Re:The Alternative? by Anonymous Coward · · Score: 0

      when path is set, you could do something like FOO=`ls -R ...` ; PATH="$PATH:FOO" or whatever

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

      one word: dependencies

    42. 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 ?)

    43. Re:The Alternative? by Anonymous Coward · · Score: 0
      Some linux istribution have a "symlinks" command which classifies symbolic links and optionally automatically deletes dangling ones.

      Yes, you have to run it by hand. I regularly do it when I do heavy maintenance (installation or removal of software on a system).

    44. Re:The Alternative? by -brazil- · · Score: 1

      The cache doesn't work for negative results (i.e. typos), except when you make it so that a new executable won't be found until you tell the shell to rebuild the cache, in which case it will THEN do an exhaustive scan. Not as bit a performance problem, but a pretty braindead design. How often do you want to tell a newbie why the shell can't find his new shell script?

      --

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

    45. Re:The Alternative? by Anonymous Coward · · Score: 0

      Actually...

      When the $PATH variable is set, the shell goes through and builds a hash table of all the executables within the directory. The difference between scanning 1 directory with 1000 files in it and 20 directories with 50 files is negligible (which is faster would depend mostly on how the underlying filesystem is tuned). If you add a new executable to a directory within your $PATH, you'll need to "hash" or "rehash" or the shell to know it exists. When the binary is executed, the shell passes a full or relative path to the system.

      The $LDPATH variable (.so libraries) is used by th system, though. I don't know offhand if it's cached or not, so it might take a few thousand cycles more to find an obscure custom library.

    46. Re:The Alternative? by djweis · · Score: 1

      Perhaps you've seen the rehash command in the C shell? It does what you describe.

    47. Re:The Alternative? by petong · · Score: 1

      I thought that according to the FHS that /opt is for add on software packages, and that /usr/local is for installing software locally.

    48. 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

    49. 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.

    50. Re:The Alternative? by Angry+White+Guy · · Score: 0

      This is the most intelligent and informative comment that I have read on /. in a long while. All unix sysadmins should read this (and e-mail it to M$).

      AWG

      --
      You think that I'm crazy, you should see this guy!
    51. Re:The Alternative? by Score+Whore · · Score: 1

      Actually I believe they keep track of every executable in your path. It's not a cache of recent results, it's an exhausitve, in memory, cache of what you got out there to run. You can say "rehash" in the C-shell which will cause it to rebuild it's cache. And there is, of course, appropriate support for the gits who put '.' in their paths.

    52. Re:The Alternative? by -brazil- · · Score: 1

      Think disk seeks, please. Scanning 20 small directories takes almost 20 times as long as scanning one large one. And it's a matter of several million CPU cycles.

      --

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

    53. Re:The Alternative? by Unknown+Lamer · · Score: 1

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

      Yes, X is in violation of this. The FHS also says that binaries go into /usr/bin. /usr is for the package manager, /usr/local is for you. Get over it. If you don't like it, roll your own distro. I myself subvert it a little...(i.e. i compiled XF4.1 on my own and overwrote the files in /usr/X11R6 until the debs came out, same with guile 1.7). Oh yes, I am evil.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    54. Re:The Alternative? by Anonymous Coward · · Score: 0

      VMS had something I thought was neat: mountong multiple directories in one directory.

      E.g.
      DISK0:[SYS$SYSTEM]=DISK1:[SYS$LOCAL],DISK1:[OPTI ON AL/BIN]

      would produce a directory with ALL THREE FILESYSTEMS' files in the one directory.

      Pardon the syntax, it's been over 8 yeasr since I've looked at a VMS system...

    55. Re:The Alternative? by sbrown123 · · Score: 1

      Im against a huge PATH entry. But the author did give some good points of having the desktops in individual folders like /usr/X11/gnome. Then put Gnome apps in /usr/X11/gnome/apps, general X apps under /usr/X11/apps, and GTK apps in /usr/X11/GTK/apps. General console binaries should go in /usr/bin. The PATH variable should only point to /usr/bin. X apps (gnome,gtk,kde,etc...) should have a startup directory path assigned to them (aka Windows). Thus AbiWord would have a startup directory of:

      /usr/X11/gnome/apps/abiword

    56. 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)

    57. Re:The Alternative? by cowens · · Score: 1
      [standard stuff about installing everthing into its own directory and then symlinking to /usr/bin, etc.] NO NEED FOR A PACKAGE MANAGER. ...


      There is still one very important reason (and pretty much the only good one) for a packaging system: dependencies. Sure I can remove a package with a quick "rm -rf packageX", but will the removal of that program adversly affect packageY? How can I tell if packageZ conflicts with packageJ? To solve these problems we use a package managment tool. But wait, if I am already using this package management tool to do the installs (for the reasons above), do I really care where it puts the executables? My answer is yes, but not very much. It would be nice if everything were installed in the manner described in the previous comment, but it is not really necessary.
    58. Re:The Alternative? by -brazil- · · Score: 1

      Putting some of the largest applications (such as KDE) into separate trees certainly makes sense, but I (and many others) prefer to lauch graphical apps from the command line, so not having them in the PATH is completely unacceptable.

      --

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

    59. 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
    60. Re:The Alternative? by waitdyahoo.com · · Score: 0

      OK, let me ask this.

      On a Windows OS, the computer searches the path ONLY until it finds what it is looking for.

      So if you set up the path properly it would seldom get very far into the path.. Maybe even the OS could intelgently reorganize teh path based on how often it finds items in a particular path and move the best ones to the begining of the search?

      Would this work?

    61. Re:The Alternative? by Eneff · · Score: 1

      And exactly what's wrong with sacrificing goats in the street?

      I wholeheartedly agree with a move to opt. I find quite often I don't even know where an application is anymore. Package managers are nice, but futility is trying to figure out what all is installed on your system, why, and where. There are commands for each of these steps, but that's like having the option of either reading a directory by two commands:

      ls aa*, ls ab*... or
      ls -aR

    62. Re:The Alternative? by sbrown123 · · Score: 1

      I know this may be real difficult but, using the method I spoke of before, you could change your PATH variable. Then, you could start console and X apps. An example using Gnome (not GTK or vanilla X apps but you could path them too) would be:

      PATH = /usr/bin:/usr/X11/gnome/apps

      To start, say, Galeon you would type:

      galeon

      Galeon, a Gnome based app that uses Mozilla's Gecko to render HTML ( in case you didnt know ) would have its binaries in /usr/bin/X11/gnome/apps. Resource files (graphics, etc) would be place in a directory with the apps name. Thus Galeon PNG files would be found in: /usr/bin/X11/gnome/apps/galeon.

      Okay, its not difficult. Its too simple. Enjoy.

    63. 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.

    64. Re:The Alternative? by user32.ExitWindowsEx · · Score: 1

      Instead of having 2000 executables in one directory or 2000 entries in $PATH, why don't people simply actually change directory (in case you forgot, change directory is 'cd [directory name]') when they need an executable somewhere else?

      In my opinion, people who want to be able to run everything from one directory on the command line are just too lazy. If you need an executable that is not in the current directory, either change directory to it or type its full path.

      --
      "Evil will always triumph because good is dumb." -- Dark Helmet
    65. Re:The Alternative? by Anonymous Coward · · Score: 0

      That's what stow does. /usr/local/stow/

      You make dir tree in /usr/local/stow, like this:
      /usr/local/stow/appname/bin/
      /usr/local/stow/appname/lib/
      /usr/local/stow/appname/share/
      etc.

      and then just run 'stow appname' from /usr/local/stow/, and it creates symlinks in /usr/local/. However, you still end up with a bunch of files, except they're symlinks, and it's somewhat easier to manage the packages you have installed...

      Alternativelly, you could do something like what quake3 does. There's a dir /usr/local/games/quake3/, which has the executable, and there's a shell script in /usr/local/bin, which tells the shell to cd into /usr/local/games/quake3/ and run quake3 from there. The quake3 executable knows where to look for the stuff it needs. Thus, you end up with a single dir in which all of a program's stuff is located (like what Mosfet is proposing), but you still run the program from a standard dir (/usr/local/bin/) which solves the problem of the shell not being able to find the program, or looking for the program in too many places...

    66. Re:The Alternative? by mandrews · · Score: 1

      Why are things that require X installing themselves in /usr/bin? They should at least be in /usr/X11R6/bin, that way when I'm in console mode I don't accidently start them.

      Mosfet is right. The big stuff like KDE and GNOME should be in their own directory. We can quibble about where the border is, but jeesh GNOME and KDE are definitely over the limit.

    67. 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.

    68. Re:The Alternative? by drsquare · · Score: 1

      Why would you not want to use a package manager? What is the alternative? Every program throwing its files everywhere willy-nilly? You'd end up with every single program with it's own directory!

      It looks like you haven't thought this through very well.

    69. Re:The Alternative? by drsquare · · Score: 1

      Two words: automatic download and installation.
      three words: automatic updating and upgrading of programs.
      four words: not requiring each app to have its own directory.

    70. Re:The Alternative? by drsquare · · Score: 1

      Are you out of your fucking tree?
      Have to cd to a different directory for every single fucking program? They do that in Windows. Ever tried using Windows? It's a nightmare.

    71. Re:The Alternative? by SnapShot · · Score: 1

      Here's a simmple C++ test, Win2k, fat32.

      // C++
      #include <iostream>
      using namespace std; //introduces namespace std
      int main( int argc, char*argv[] )
      {
      cout << "'" << argv[0] << "'" << endl ;
      return 0;
      }

      name the program 'name.exe' and copy to 'c:' and run from console.
      c:\> name
      'name'
      c:\>c:\name.exe
      'c:\name.exe'

      It only gives you what you entered...

      Here's what K&R had to say about it.

      _The C Programming Language_, Kernighan & Ritchie, (c)1978 Bell Telephone Laboratories, Inc., pg. 110-111, "In environments that support C, there is a way to pass command-line arguments or parameters... By convention, argv[0] is the name by which the program was invoked...".

      --
      Waltz, nymph, for quick jigs vex Bud.
    72. Re:The Alternative? by El+Prebso · · Score: 1

      I totally agree. The cool part about this one is that it has no databases. It is controlled by links.

      It works like this: (Using Licq a an example)
      You set --prefix=/pack/licq-1.0.3
      Then licq-1.0.3 is linked to /pack/licq.
      The we tell packman that it should look in /pack/licq. Then we update. Every file in /pack/licq is linked into /coll/local/ All you have to do now is add /coll/local/bin to your PATH. If you want upgrader simply install the new version in for example /pack/licq-1.0.4, move the /pack/licq link so it points licq-1.0.4, and run update. It is not like RPM or apt-get, because you still have to compile stuff your self. It just helps you keep track of your software.

      It works really great and you don't have to worry about any dumb database getting all screwed up. And if you place /pack on a partition by it self. You can format all other partitions and just rerun packman after an reinstallation, and you have all the software you had before.

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

      :)

      Try tell that to a newbie. I am talking intuitive file systems, not just manageble ones. Package managers are manage tools, if the management was simple enough to start with, they wouldnt be needed. And a skilled person can ALWAYS manage on his one.

      Personally I like switching between stable and development version eg. KDE2/3. Therefore I never link things from /opt*/bin to /usr/bin.

      I like to think it is a good hint that I've done something right, whenever I dont need to be root to install or upgrade..

    74. 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.

    75. Re:The Alternative? by Anonymous Coward · · Score: 0

      Shut up asshole, you know nothing moron. The scum who installed 2,000 files in your usr directory ought to be banned from even releasing software, they're obviously amateur shits who have no logical ability to organize anything whatsoever.

    76. Re:The Alternative? by Petrus · · Score: 1

      Right.

      Better put the link to /usr/bin in the installed application directory, and follow the symlinks to delete executable.

    77. Re:The Alternative? by -brazil- · · Score: 1

      Sure, that's the smart way, and that's what I'd do - for everybody (It's also how SuSE does it). I really don't see why PATH=/bin:/usr/bin (you would add /bin, yes?) should be the default. Admittedly, anyone using the command line preferrentially would probably know why and how to change PATH, but why not spare them the hassle?

      --

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

    78. Re:The Alternative? by Anonymous Coward · · Score: 0

      The Unix way it to put similar files into the same directory not all files of a particular program into one directory (like e.g. win). This has several advantages: If you are looking for a certain binary, you can easily find it by looking into a few ../bin directories. If you are looking for a configuration file, you can find it either in /etc or in your home directory if it's user-specific. (This makes it also easy to backup your configuration: just backup all /etc files and the home directories.) If you are looking for man pages, search in the man directories. Log files to into /var/log, temporary files into /tmp (which makes it easy to put them on a separate partition) etc.etc... If you go the windows way, you have to maintain a large number of PATHs, MANPATHs, WHATEVERPATHs and the shells have to either search them or cache them (another unnecessary memory hog).
      The one program one directory approach may be more suitable if you are frequently fiddling with your installation, but it's a drawback if you want to actually work with your system.
      Also note that Windows users never start their applications with their shell, because most of the apps directories are not in the PATH and they would have to CD into the respective directory. The same for help files (is there a central help database? no. you have to go to the programs directory and search the help file or start the application and use the help menu)

    79. Re:The Alternative? by nessus42 · · Score: 1

      Every single program should have its own directory. If you have software installed on NFS servers, it's the only way to go. I've managed networks with hundreds of Unix workstations on them. It is you who hasn't thought through things very well.

    80. Re:The Alternative? by Little+Boy+Blue · · Score: 1

      This is great until you get some anal expulsive app that needs to stick stuff all over the filesystem.

    81. Re:The Alternative? by vscjoe · · Score: 1
      The alternative is to make the shell understand about the notion of an "application" that consists of a bunch of files living together in a directory. That way, you could say something like "my path consists of all the application directories that are subdirectories of /usr/apps".

      And you can, of course, also create directories of pointers to where stuff really lives through symbolic links, together with a process that cleans them up every now and then when they have gotten stale.

    82. 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...'
    83. Re:The Alternative? by Anonymous Coward · · Score: 0

      set PATH = ( \
      /bin \
      /sbin \
      /usr/bin \
      /usr/sbin \
      /usr/local/bin \
      /usr/local/sbin \
      /usr/local/apache/bin \
      /usr/local/mailman/bin \
      /usr/local/mailman/Mailman \
      /usr/local/proftpd/bin \
      /usr/local/mozilla \
      /usr/local/netscape \
      /usr/local/junkbuster \
      /usr/local/dict \
      /usr/local/xmms \
      /usr/local/gogo \
      /usr/local/jri \
      /usr/local/postfix/bin \
      /usr/local/snort/bin \
      /usr/games \
      /usr/X11R6/bin \
      /usr/X11R6/sbin \
      /usr/X11R6/Mesa \
      /usr/X11R6/gimp \
      /usr/X11R6/open-motif \
      /usr/X11R6/officeware/koffice \
      /usr/X11R6/officeware/nedit \
      /usr/X11R6/officeware/staroffice \
      /usr/X11R6/officeware/Corel \
      /usr/X11R6/windowmanagers/fwm \
      /usr/X11R6/windowmanagers/gnome \
      /usr/X11R6/windowmanagers/kde \
      /usr/X11R6/windowmanagers/ude \
      /usr/X11R6/windowmanagers/windowmaker \
      /opt/bru/bin \
      /opt/bru/sbin \
      /opt/vmware \
      )

    84. Re:The Alternative? by Anonymous Coward · · Score: 0

      Everyone was a newbie once, even you. Once you knew not about symlinks. Once you knew not what md, cd, or even fucking dir meant. So stop being a jackass and remove that black 12" squirting dildo and if you don't have anything better to say then shut your hole.

    85. Re:The Alternative? by swright · · Score: 1

      This way though the _worst_ you get is broken links - you can manage [and delete] the apps fine.

      and a simple script in crontab [as others have posted] would keep the symlinks relatively clean - and be an easy addition for the average distro to make.

    86. Re:The Alternative? by Anonymous Coward · · Score: 0

      been around in unix since 4.4BSD.

    87. 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"

    88. Re:The Alternative? by Anonymous Coward · · Score: 0

      Yes, bin should be there also.

      And yes, even slight modification to the PATH would confuse a average computer user. Even though Linux is not for everyone, making for everyone should be a priority. I use RH and am not familiar with SuSe but am glad they have made the move to improve the situation.

      I would be glad if the desktops would do this PATH appending automatically (ie lookup in a set directory and set the PATH accordingly). Maybe this could be a project....

    89. Re:The Alternative? by k4m3 · · Score: 1
      I install new applications (if you can use the word to describe small utilities)

      We are talking about application. Like Apache Server, OpenOffice, video manipulation app or others applications, not small utilities. You have the same digression as the previous post, just wanting to put ls in /bin/ls and to put cd in /bin/cd. Right isn't it ?

      I hope that you have a good classification scheme in order to remember your 80Gb (or 10GB as you prefer) of small utilities :-)

    90. Re:The Alternative? by djweis · · Score: 1

      I'm not saying I agree with the rehash part, just that it does exist. I think for the amount of computing power I have on my desk, it's a fair tradeoff to look through a dozen directories for executables.

  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 nochops · · Score: 1

      Since when do binaries go in the System or System32 directory?

      Havent you heard of \Program Files?

      --
      "A terrorist is someone who has a bomb but doesn't have an air force." -William Blum
    2. 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

    3. 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.
    4. Re:better command path system? by gregRowe · · Score: 1

      Actually windows\command is for legacy ms-dos commands that they don't bother rewriting since they feel the CLI is useless.

      --
      There\'s no place like ~
    5. Re:better command path system? by nochops · · Score: 1

      The key word here is "Windows".

      Third party parograms rarely go into these folders.

      --
      "A terrorist is someone who has a bomb but doesn't have an air force." -William Blum
    6. 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?

    7. Re:better command path system? by psamuels · · Score: 1
      Win32 has the System32 (or System) directory, *nix has /usr/bin, /usr/share/bin, /usr/local/bin etc...

      Two major problems Windows has because of this (well, major IMO): one, it doesn't have an analogue for LD_LIBRARY_PATH - loading a DLL searches the same path locations as loading an EXE. Therefore %SYSTEMROOT%\System32 is bloated with DLLs and other hangers-on rather than just EXEs.

      (Thus, I would argue that the /usr/bin layout is in fact superior to the System32 layout, because we also have /usr/lib and /usr/share to syphon off some of the clutter.)

      Second, Microsoft seems to espouse the position that "non-8.3 filenames are not reliable enough to depend on for system DLLs" - thus, the namespace is really cramped and it's hard to version the shared libraries ... leading to DLL Hell. FWIW, the "Long Filenames Considered Flaky" assumption is IMO correct, at least on FAT partitions. And I guess they still have to support installing to FAT..

      Sometimes I feel sorry for MS OS developers. I really do. The mess is of their own making, but it still can't be much fun to deal with.

      --
      "How can you claim that you are anti-crack, while still writing a window manager?" — Metacity README
  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 Angry+White+Guy · · Score: 1, Informative

      Don't know about the rest, but slack does the same thing if you let it. The nice thing about slack is that 9 times out of 10, you have to build from source, and get a much cleaner install. I find it easier to track broken symlinks than to remember the name of the binaries which run all the software on my server.

      Combat End User Ignorance - Tell them they're useless and can be replaced by VAX!

      AWG

      --
      You think that I'm crazy, you should see this guy!
    3. 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!
    4. 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
    5. 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
    6. Re:he's pretty far off base by -brazil- · · Score: 0, Troll
      No, I don?t use Linux on a daily basis


      Which anybody not using Windows can tell from the fact that your apostrophes appear as question marks due to Microsoft not using ASCII. Please fix...

      --

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

    7. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      ummm...no. If you're talking about Daniel M. Duley (the one pictured on the Mosfet page), then he is a he.

    8. Re:he's pretty far off base by Score+Whore · · Score: 1

      I think the problem is on your side of things buddy. I'm using RH 7.1+XFS+Mozilla 0.9.5 and nothing looks out of place in his post.

    9. Re:he's pretty far off base by -brazil- · · Score: 1

      That's because Mozilla apparently contains a bugfix for Mocrosoft's non-standard ASCII extension. Netscape 4.7 doesn't, and I'm afraid the Sparc version of Mozilla is too damn bloeated to use. Besides, it's no excuse for using a broken charset that some browsers will fix it.

      --

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

    10. 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".
    11. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      then He is a cross dressing freek who needs to leave the geeks alone.

    12. Re:he's pretty far off base by Score+Whore · · Score: 1

      How do you know it's not Netscape 4.7 that is broken? Personally I'd never, ever point at Netscape 4.anything and say "see that's the right/correct way to do it."

    13. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      Actually Redhat predates Debian and I am pretty sure that it predates SUSE. The last good version of Redhat was the one right before 4.0 -- I think it was 3.3.0 -- It was great. Of course at this point in time GNOME didn't exist and KDE was brand spanking new. So desktop environments trashing your clean filesystem really didn't apply back then.

    14. Re:he's pretty far off base by -brazil- · · Score: 1

      Because I know the exact source of the problem: Microsoft decided that right and left double quotes must look different (which is not so bad an idea) and wrote their programs to use a proprietary, non-standard extension of the ASCII characters in order to preserve this difference when operating on plain text (which is). While they were at it, they included the apostrophe and a few other characters.

      --

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

    15. Re:he's pretty far off base by Halo- · · Score: 1

      Um... AIX uses /usr/lpp/packagename for nearly everything.
      Especially stuff IBM ships. /usr/bin contains symlinks.

      Dunno about the other OSes...

    16. Re:he's pretty far off base by Score+Whore · · Score: 1

      Hmmm. Ever used a Mac? They've done this for a long time (ie. quotes being right-/left-ed.) Seems like an industry standard to me.

    17. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      Oh yeah, Sun is great:
      $ ls /opt
      SUNWebnfs
      SUNWitsSUNWrtvc
      j2sdk1_3_1_01

      of the 4 directories, one is clearly named, one is horribly named, but guessable, and two are completely incomprehensible.

      Solaris is hardly the model to follow here...

    18. 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.
    19. Re:he's pretty far off base by -brazil- · · Score: 1

      No, never used a Mac. Do they actually do this when saving text as PLAIN TEXT? I doubt it, otherwise I don't think that character set would be called "Windows-"

      --

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

    20. Re:he's pretty far off base by Adam+Bauer · · Score: 1

      I don't really have any problem with commercial Unixes but saying that Solaris is better organized than distros like Debian or Slackware is crazy.

      I've never seen anything that scattered things all over the place more than Solaris 8 does (not to mention the symlinks *everywhere*). It's a complete mess and certainly not near as nice as a lot of the free systems.

    21. Re:he's pretty far off base by roadoi · · Score: 1

      IIRC SuSE is an rpm based distro, so how is it possible that SuSE was around before redhat..?

      --
      In God We Trust, Everyone else must have an X.509 certificate.
    22. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      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).

      And every time I install slackware I go through a ritual cd /mnt; mkdir opt; ln -s /mnt/usr /mnt/opt/gnome and fix that little "feature" :P

    23. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      Sun's SysV-based package management system limited package names to nine characters until recently. This doesn't allow very meaningful names especially since convention is to prepend the company stock symbol name to avoid naming conflicts. Solaris 8 patches remove this nine character limitation.

      The pkginfo command (without any flags) can be used to learn more about a package. For example:

      % pkginfo SUNWdtpcv
      system SUNWdtpcv PC File Format Viewer binaries, filters and convertor

      Also, most Sun software doesn't install into the /opt directory. Try typing "pkginfo" for a complete list of packages -- there's hundreds besides the three that you listed.

    24. Re:he's pretty far off base by Anonymous Coward · · Score: 0

      I'm curious.. which symlinks bother you the most?

    25. Re:he's pretty far off base by Adam+Bauer · · Score: 1

      It's not that symlinks bother me... It just seems like sun wants to throw three or four in for every app or config file they ship (okay, I'm exagerating a bit but not much). /etc is especially bad for this.

      I understand they're doing this for compatability but it still seems excessive. Sometimes, IMO, it's better to let a few applications break.

  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 Anonymous Coward · · Score: 0

      But you still have the entry. A much better way would be a PATH that has a recursive directory flag.

    3. Re:I think it is better... by Anonymous Coward · · Score: 0

      GNU STOW does a pretty good job of this.

    4. 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
    5. 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.

    6. Re:I think it is better... by EnderWiggnz · · Score: 1

      PATH with recusion?

      no way. way too open to trojan attacks. This basically means, that you dont know what, exactly, is in your path.

      What about Directory symlinks? someone puts a link in /usr/bin/foo -> /nasty/trojan/dir and then all of a sudden, your path searches through there.

      It would also be a horrible waste of resources to search recusively through all these directories.

      no, bad idea.

      --
      ... hi bingo ...
    7. 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.
    8. 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?
    9. Re:I think it is better... by rhost89 · · Score: 1

      Thats what symlinks -d /path/to/symlink/bin is for ;9

      --
      I will bend your mind with my spoon
    10. Re:I think it is better... by Stephen+Williams · · Score: 1

      That is exactly what I do. My personal organization system goes like this:

      - programs are installed into /opt/program/version, e.g. /opt/lame/3.86;
      - /opt/program/current is symlinked to the latest version, e.g. /opt/lame/current is linked to /opt/lame/3.86;
      - /usr/local/bin/program is symlinked to /opt/program/current/bin/program, e.g. /usr/local/bin/lame is symlinked to /opt/lame/current/bin/lame. (Similarly for libraries, man pages etc).

      Installing a new version is simple; I just have to remember to update the /opt/program/current symlink. I often keep one or more old versions lying around just in case I need to revert one, which again is easy, just point the /opt/program/current symlink somewhere else.

      Uninstalling is a breeze; just wipe out the directory under /opt, and nix the symlinks.

      It still more managament than some people would want, but at least it's relatively clutter-free; I can live with /usr/local/bin, /usr/local/share/man etc. being full of symlinks.

      (This is only for programs I compile from source, of course. Everything else I leave for dpkg to put wherever it wants).

      -Stephen

    11. 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!
    12. Re:I think it is better... by dabadab · · Score: 1

      It's not just executables, but all the stuff in /lib, /var, etc... how does this solves THAT?

      --
      Real life is overrated.
    13. Re:I think it is better... by -brazil- · · Score: 1

      Sure, and we'd never want a program to be able to write, say, a date or configuration file to a user's home directory...

      --

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

    14. Re:I think it is better... by aozilla · · Score: 1

      I'd rather have all the dates and configuration files in the chrooted user's home directory. Again, makes for easier cleanup. Any files which want to be explicitly shared can be hard linked just like the libraries.

      --
      ok then your [sic] infringing on my copyright! Could you as [sic] me next time before STEALING my comments for your own?
    15. Re:I think it is better... by -brazil- · · Score: 1

      Um, the point of chroot is that you have ONE 'fake' root, and the chrooted program can't access anything outside. So do you want the program to be chrooted into its own directory and unable to write any user-specific data, or chrooted to the user's directory, requiring the ENTIRE system to be hardlinked there? Or am I misunderstanding something?

      --

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

    16. Re:I think it is better... by Espen+Skoglund · · Score: 1
      When I did my turn as a sysadm, we used a system called Store to do all the management for us. The system basically contained a directory for each packages/application. Each package had its own directory tree which was symlinked into the respective location of the store tree (usually "/store", but could also be "/usr/local" if you configured your system that way).

      The directory tree in each package could also contain a mixture of different architectures so that one could share most of the package's files (e.g., man pages) among platforms and only keep separate files where needed (e.g., executables). The scheme allowed you to categorize the files into any granularity you wanted. You could for instance have one exeuctable for m68k, one optimized for Pentium4, another optimzed for 486, and a generic x86 one (if you had, say, a PentiumIII). The system made sure that the symlink which suited you best was used.

      There were also, of course, possibilities to specify files only valid for certain OSes and OS revisions, and one could specify files which should be valid only within one certain domain, or on one certain host.

      Another feature was the ability to keep multiple versions of the same application around, and mark the different versions as stable, release, beta, etc. This allowed you to specify hosts or domains which only should run stable software, which should be able to run beta software, and so on.

      In addition to keeping multiple versions of the binaries around, the system also could keep multiple build frameworks around. The build framework could contain configurations for various OSes and platforms, and allowed applications to be more easily installed on various architectures.

      Of course, there was also a package config file indicationg the name of the package, short info, dependencies, etc.

      For distribution one could create a tree-like structure where the whole or a subset of the packages and binaries for the packages were automatically mirrored to hosts in the network. This allowed you to have most of the packages located on the servers while the clients which had only limited diskspace only had a limited set of packages (e.g., shells) installed locally.

      There were also add-ons to automatically configure various environment variables on the hosts, configre mailcap/mime-type files, emacs configuration entries, info-file entries, etc.

      The whole thing worked wonderfully (once you as a sysadmin learnt how to use it properly). It automatically propagated new applications throughout the system once you installed them and generally made life easier for the sysadmin. Installing software on new machines was also pretty painless. You just configured your new client system, fired up a single command, and all applications suitable for the system were installed and configured for you.

    17. Re:I think it is better... by drsquare · · Score: 1

      I don't know about other distros, but Debian has this thing called "package management". It solves this problem, and stops programs installing things wherever they want willy nilly.

    18. Re:I think it is better... by sasha328 · · Score: 1

      I am surprised that no one has refered to Apple's Finder (a shell of some kind). The finder kept it's own database of files/applications/associations. This made installing applications very easy. Just place them anywhere you want, and voila, it works. Some needed some extensionswhich went into the extensions folder, but the executable could be placed anywhere.
      Apple's OSX has a system called packages (bundles under NextStep), where all the files for a certain application are stored in the one folder. Renaming the folder foo.app makes it an "executable" in the gui. You can still browse the contents though if you need to.
      I think this makes managing appllication a lot easier. Besides, you can place these packages anywhere you want, you just have to create a shortcut (symlink) to the folder an place it somewhere accessible.
      ArsTechnica has an article about this.

    19. Re:I think it is better... by aozilla · · Score: 1

      The idea is that mozilla would be chrooted to /usr/local/mozilla. Assuming a single user machine, you could simply have /usr/local/mozilla/etc/passwd point the home directory to /usr/local/mozilla/prefs, for instance. Assuming a multi-user machine, you'd have to have subdirectories, maybe /usr/local/mozilla/prefs/username. In the rare case of preferences which need to be shared between programs, you can hard link them into /usr/local/mozilla/prefs/username, /usr/local/netscape/prefs/username, and /home/username, for instance. The users directory would be essentially empty, and documents could be put in a separate partition (NFS mounted? There must be a cleaner way to do it...)

      The only real problem I see is that it forces you to put basically everything in a single partition, but I'm sure if it ever caught on that could be worked around.

      --
      ok then your [sic] infringing on my copyright! Could you as [sic] me next time before STEALING my comments for your own?
  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 kaisyain · · Score: 1

      Then why do you separate bin and lib and man and etc? Just have a directory called /system and put everything in there. Everything just gets looked up by name anyway and that would simplify your PATHs, MANPATHs, and LIBRARY_PATHs.

    3. Re:Package Management by nicklott · · Score: 1

      So what's the point of have directories at all?
      Why not just dump everything into the root? Why not re-work the filesystem to only have files, not directories?
      Of course after a while you'd find that you needed to put a tag on all the files that belonged to an package, just so your package manager could see which files belonged to which app...

    4. 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.

    5. Re:Package Management by eskimoe · · Score: 1

      careful with that. if you actually care about the integrity of your binaries (wherever they reside) use something like tripwire, never trust rpm. dpkg is superior for package management anyways. your package manager is responsible for keeping depencies in shape. assuring file-integrity on your box exceeds the capabilities of any package managment system available todate. nevertheless i agree with you (and some other posters) regarding the initial topic.

      --
      eat more plastic.
    6. Re:Package Management by tjansen · · Score: 1

      Easy question: because you want to have a single namespace for all executable files, a single namespace for all man pages and so on.

    7. Re:Package Management by kaisyain · · Score: 1

      Why isn't that considered unnecessary directories? Executables are those things in /system that are +x. The library loader looks things up by name. Same for man. Seems like they are split up because while a program can handle the flat namespace people like things to be a little more structured. What one person thinks is unnecessary structure another finds completely necessary.

    8. Re:Package Management by HKelle · · Score: 1
      Package management and seperating stuff into name spaces are two different problems (but related).

      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. Now if this would be organized into some namespace structure (like the name of the package it belongs to or better, something to to with its functionality) I would be much wiser. Sure, I can use the package system to query for this but thats just a hack created when the flat namespace got too large. I like to use the tools available to solve tasks, not write a new one for each problem. The filesystem structure and standard unix commands (such as which) solve this problem, no need for an extra database for this (the filesystem is a good database).

    9. 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.
    10. Re:Package Management by Anonymous Coward · · Score: 0

      And what if you want to compile a couple of programs that don't have a convenient RPM package? /usr/local/bin can begin to build up cruft.

    11. Re:Package Management by Anonymous Coward · · Score: 0

      ahh wonderful. so now if you're stuck and rpm has broken for some reason (which a --rebuilddb doesn't fix), suddenly you're screwed. no thanks. if i can't see whats on my system from the commandline without helper executables that hide the mess, there is something flawed with the system.

    12. 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.

    13. Re:Package Management by yason · · Score: 1

      Package management helps with this, yes. It doesn't fix the fundamental problem.

      A few points for your interest. They mostly advocate packing GUI programs into a single directory. For command-line program it doesn't really matter where the binaries are but also in their case, documentation and datafiles should be in their own directory.

      • Should all GUI-programs unpack into one directory and be runnable from there, any non-admin user could easily install software for himself. Just grab the rpm, install it to ~/MySoftware/FooEditor or something and off you go. This is want Windows people want to do if they need to.;
      • The program directories could maintain a standard structure inside themselves: FooEditor/lib, FooEditor/doc, etc. to keep it sensible for the developers. But from outside the program's custom directory structure, it'd just look like on simple directory. Most notably, when you'd open a program directory, you'd see the icon for the binary, perhaps an icon for documentation and nothing more. Command-line programs could stuff their data files into their own directory and install a symlink to /usr/bin for example;
      • Since all programs would still come from packages, it wouldn't be easy to add each program's library directory to ld.so.conf or the directory where the binary is to PATH. Remember that we typically already maintain hierarchial menu entries for KDE/Gnome programs. And the program itself could refer to ./icons/fooeditor-splash.png too, for hardly any other program would have to access another program's splash image or any other file of similar essence;
      • We wouldn't need the damn KDE/Gnome menus, if people could just open /usr/applications/ in their file manager and see which applications are there. Click on the directory, click on the icon of the executable and off you go! Even a regular Joe can maintain and organize a bunch of applications if they're just there and nowhere else;
      • We could still keep a directory of so-called system commands. Like C: in Amiga which had this mostly right from the beginning. You would install command-line-only programs in C: (say, /bin or /usr/bin) and have GUI applications in one directory/binary-exe each and organize the directories to your likings, like in a Applications/ folder. Let the user create a MiscApps/ folder for simple binaries that don't have any related files with them. As for Amiga, note that many programs _did_ install their stuff to Amiga's system directories but not nearly as annoyingly as Linux applications do;

      Finally, I'd like to say that since we have hierarchial directories and we tend to organize things in groups and subgroups (and subsubgroups) it'd be only natural to have a different kind of system tree layout. When you want to mess with program X's example files you might want to take a look at program X's documentation too, not program Y's example files.

    14. Re:Package Management by neurojab · · Score: 1

      Naming conflicts ARE a problem... but using several directories actually exacerbates the problem. What if you want to install a bin (let's say it's bash), and you put it in /usr/local/bin to avoid name conflicts, without checking to see if there's already a version in /usr/bin? Then which version are you going to see? Which one are your users going to get? It's a big unknown, and having additional global directories just makes it worse. How many different copies of "bash" do you want floating around anyway? Probably just one. What DOES work, however, is putting a "bin" in each user's HOME dir, and putting "~/bin/" in the front of the path. That way your users can override the namespace if they "really need" that new "bash".

    15. Re:Package Management by Anonymous Coward · · Score: 0
      No, you don't. It's the package manager's job do avoid any conflicts.

      This is where I disagree. The structure should be designed from the start to reduce conflicts. Throwing everything into one directory and relying on a package manager to sort it out is doing it backwards. Basically you're relying on the package manager to implicitly provide the structure lacking in the explicit directory structure. p>

    16. Re:Package Management by drsquare · · Score: 1

      Oh great, so when I want to save all my configurations, instead of just being able to backup /etc, I have to go round checking whether each individual file is a configuration file? No thanks.

    17. Re:Package Management by nessus42 · · Score: 1
      Package management tools don't work when you want to install (or update) a program on an NFS server that will be instantly seen by hundreds of workstations. The model of having one directory per program does work quite well for such an environment. Unfortunately, doing things this way usually requires rebuilding each such software package from source, because most developers and the designers of Unix didn't carefully plan for the needs of administrators of large networks of Unix computers.

      Of course, Microsoft does even far worse in this regard.

      |>oug
      <nessus@mit.edu>

    18. Re:Package Management by Anonymous Coward · · Score: 0

      And by the same token, many of us (including the article writer) want a separate namespace for some of the individual packages - one for X, one for KDE, one for Gnome, etc.

  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.
    2. Re:Linux From Scratch by MadCamel · · Score: 1

      Indeed.. but ever try installing stuff by hand on a debian system? Perhaps I don't know it's system well enough.. but it *BREAKS*, bad. and overwrites what you install with it's own version the first chance it gets. I've had similer experiences with RedHat(though not as bad). In my experience, package managment and hand installs do not mix, especialy on systems where package-managment is taken to the extreme. Your milage may vary.

  10. Nah... by LinuxGeek8 · · Score: 1

    Well, if he thinks the windows installs are clean, then let him just install 1000 programs, and deinstall them.
    Then check how much space you used before and after, and just start to panic.

    Some Windows applications have become lax at this and started installing into the "windows" directory.

    And I thought all Windows programs did this.

    In a way I like to have all my programs in some /bin dir (/bin, /usr/bin, etc).
    And if I want to know what program a certain file belongs to, I just do a rpm -qf file.

    He's a bit ranting about RedHat, but I assume he means more Unixes than RedHat alone though.

    --
    Well, don't worry about that. We can get you back before you leave. (Dr. Who)
    1. Re:Nah... by keath_milligan · · Score: 1

      Well, if he thinks the windows installs are clean, then let him just install 1000 programs, and deinstall them. Then check how much space you used before and after, and just start to panic.

      Aside from apps that have outright broken uninstalls, there is a semi-legitimate reason for this: Many Window sapplications install shared DLLs like msvcrt, mfcxxx, etc. - once these are installed, you aren't supposed to remove them (and there is no good reason to).

      Some Windows applications have become lax at this and started installing into the "windows" directory.

      And I thought all Windows programs did this.

      Not since the Windows 3.x days.

  11. 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 nochops · · Score: 1

      You can't blame this on Windows. Not this time, buster!

      While this is true, it really has nothing to do with Windows. It has everything to do with the installer/uninstaller program.

      *nix install / uninstall programs could be just as sloppy at removing files, but would you then call *nix sloppy? I think not.

      The fact is, the responsibility of removing files during an uninstall rests on the uninstall program, and the schmo who wrote it, not the Operating System.

      --
      "A terrorist is someone who has a bomb but doesn't have an air force." -William Blum
    2. 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.

    3. Re:Response by vrt3 · · Score: 1

      Actually, the uninstaller says something like "I think no other programs are using it, but I recommend not to delete it. Do you want to delete it?". I don't know the exact text, but that's what it means. It doesn't sound like it knows what's being used and what isn't.

      --
      This sig under construction. Please check back later.
    4. 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.

    5. 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
    6. Re:Response by Anonymous Coward · · Score: 0

      Windows maintains a list of shared DLLs in the registry along with a value indicating the number of programs using it. The number is automatically incremented/decremented whenever a piece of software that uses it is installed/uninstalled. Only when the value is 0 does the warning appear asking if you are sure that you want to delete that particular DLL. So technically, the uninstaller does know what is/isn't being used.

    7. Re:Response by vrt3 · · Score: 1
      Since you seem to know more about it than I do: is there a chance that there is an application using the DLL that the registry doesn't know about? How big a chance?

      I always answer 'No' to the delete question, but if there's only a handfull of abscure applications that don't behave nicely, I could get rid of more unneeded DLL's.

      --
      This sig under construction. Please check back later.
    8. Re:Response by Anonymous Coward · · Score: 0

      In my personal experience, the chances of a problem are very small. I usually answer 'Yes to all' and I can't remember the last time I had a problem with missing DLLs (crossing fingers). It's actually much more common for Windows not to decrement the counters properly, so you may have unneeded DLLs scattered around which Windows thinks are still in use.

  12. 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
  13. 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
    1. Re:the BeOS filesystem by Zoinks · · Score: 1

      MacOS has done something like this for years, right? I'd bet that's where BeOS got it. I'm sure BeOS improved it, but it was a good idea to begin with.

      A look at Max OSX would be helpful. They somehow achieve a similar functionality on top of a Unix file system. I don't have the docs on hand, but I remember reading in their tutorial for SysAdmins about their package management, and how all a particular app's files were kept in one folder. Don't kow how it works since I don't have OSX installed yet...

    2. Re:the BeOS filesystem by cpt+kangarooski · · Score: 1

      Although MacOS _does_ do what you describe with regards to application binding (rather elegantly -- though OS X has regressed to a crappy-ass method, as though it were strapped underneath a Devolvo-Ray) it doesn't really help all that much with regards to organization.

      Heavy use of resource forks, streams or workalikes (OS X application bundles don't fit the bill -- there are other uses for this besides actual applications, e.g. documents with included fonts) to bind multiple files and subdirectories together into what generally behaves like an atomic object, which is executable on its own strikes me as another element of a better solution. Especially if combined with a) symlinks and b) a GOOD UI for interacting with the guts, perhaps with inspiration from the MacOS 7+ System Folder.

      --
      -- 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.
  14. 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.

    1. Re:Everyone's guilty, noone has a solution. by spauldo · · Score: 1

      I agree fully that the FSSTD isn't redhat's fault; UNIX has been that way for quite some time (although, I noticed in my xenix manual that home directories were under /usr, and binaries under /bin - that was interesting).

      /usr/local is very handy. If something in is /usr/local, it's because I put it there. It's my own little section to play with. I don't mess with /usr unless I have to.

      /home may be confusing to a windows migrant, but where else would you suggest putting user info? Windows NT gives you c:\winnt\profiles\user - how is that any different? A normal user will never need to move outside their home directory.

      The /usr/apps, /usr/utils, etc. is less handy than you might think. Why would you organize them in such a way? You don't chdir into a directory like that to run a program, and a user doesn't have rights to anything there anyway. What about libraries? /usr/share seems to fit this space fairly nicely, although I do wish there was a bit of standardization for /usr/share.

      Personally, I don't mind the way things are now, although I'd like to see /opt used more for major packages like GNOME, mysql or mozilla. Small applications don't really need segregation (IMHO anyway).

      --
      Those who can't do, teach. Those who can't teach either, do tech support.
    2. Re:Everyone's guilty, noone has a solution. by Anonymous Coward · · Score: 0
      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.

      A lot of applications place it directly onto the start menu, NOT under Programs, and not under any folder. Sometimes it's under Programs in addition to that. It's annoying because the programs directly on the menu have double-size icons. I know you can change that, but I'm talking about other people's computers, where you press the start button and see "MS Word", "MS Excel", "MS Powerpoint", "Wordperfect", "Netscape", "Random Program #17", and either an up arrow to scroll (not a scroll bar, that would be too obvious and convenient), or a menu so large it is split horizontally into 2 large menus.

      Wouldn't it make more sense to have a setup like /usr/apps, /usr/utils, /usr/games, /usr/wm

      That seems like a good idea. Organizing further, like /usr/wm/windowmaker would be nice too. BTW, /usr/games already exists, at least on Debian. I don't know why, since it seems like an inconsistency to have /usr/games and /usr/X11, and dump everything else into /usr/bin. I think everything should should still be linked into /usr/bin so you don't have to extend your path variable (bad symlinks are really easy to find and delete).

      Using /usr/local would be bad because package managers shouldn't be touching it - that's for use by the sysadmin. You could also put packages under /opt/packagename, but organizing by functionality would be better. It would also be easier to find programs, since you could look under /usr/internet when you needed a web browser, instead of looking through /usr/bin for one.

      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.

      Is it confusing? I've never seen a Windows migrant confused by it. Your files go into /home/username, much like they'd go into "C:\My Documents" on Windows. Most programs will start in your home directory anyway, so you don't really need to remember it. I think a multi-user OS is useful for home users. It prevents people from getting viruses or destroying their computers by accident (you can't screw anything up too badly, unless you're logged in as root). It also means that each member of the family can have some privacy from other members. Parents generally don't want their kids going through their personal or business files (or worse, deleting them), and the kids don't want parents reading their ICQ messages.

    3. Re:Everyone's guilty, noone has a solution. by dmelomed · · Score: 1

      DJB has a solution: http://cr.yp.to/unix.html

    4. Re:Everyone's guilty, noone has a solution. by esper · · Score: 1

      What about libraries? /usr/share seems to fit this space fairly nicely

      'Fraid not. /usr/share is designated for "architecture-independent data". I don't consider libraries to be data and they're certainly not architecture-independent.

    5. Re:Everyone's guilty, noone has a solution. by spauldo · · Score: 1

      Erg, that's what I get for posting when I'm tired.

      I didn't mean that libraries should go in /usr/share, it was just part of the example of why programs couldn't just be all put in their own directories.

      What I meant about /usr/share was that it seems pretty well set up for what it does. I just wish that it was more standardized in the way that /usr/share/backdrops would be a good place for background images, /usr/share/icons a good place for icons, etc. As it is I have to hunt down a few things when I want to use them, but it's not bad at all.

      Of course libraries wouldn't go in /usr/share, that would be silly :)

      --
      Those who can't do, teach. Those who can't teach either, do tech support.
  15. Why when you have a package manager? by Chanc_Gorkon · · Score: 1

    You know, I hate it too, but hey at least with Linux you have a package manager. With Windows you don't have that! Also, KDE, GNOME and others are ALL dependant on shared libraries and you sure as heck don't want 40 copies of the libraries for all of the programs you run! Also, even if a program is in a sub directory under /usr, isn't everything in the path when you include /usr in your statement?? /usr is the parent of everything underneath it. If /usr is in the path, then so are it's children. At least I think that's the way it works. Anyway, with packagemanagers such as Debian's apt, this is moot! Who cares! Why would I delete it the hard way when I can press a button (in the graphical tool) or do a apt-get remove package???

    --

    Gorkman

    1. Re:Why when you have a package manager? by Anonymous Coward · · Score: 0

      I'll think that you will find that Windows does have this

    2. 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.

      --
      ¦ ©® ±
    3. 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.

    4. 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

  16. 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... ;)

  17. 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.

  18. 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 Hektor_Troy · · Score: 1

      why is it bad that I have 2000 files in /usr/bin?

      Hmm ... lemme see if I can answer that, even though I'm no linux-buff (I use FreeBSD at home, but I suck at that as well).

      If I want to be sure that I have removed a program completely, it's impossible to be sure, since there are now 1999 files in /usr/bin. "But the package-remover takes care of that.". Are you sure? If it's even close the the standard of the windows uninstaller, it'll leave a ton of files lying around ... just in case.

      Compare it to your messy bedroom (if you take offence, compare it to my messy bedroom instead): Even though I know where everything is (more or less), it's still a mess and it takes me some time to find all my dirty laundry. With a messy /usr/bin, it takes alot of time finding the one ini-file you need to modify. Is it called xyz, xzy, yxz, yzx, zxy or zyx?

      I'm sure people more skilled in linux/bsd/whatever can come up with better reasons than this, but you even came up with an answer yourself: "satisfying someone's overeager sense of order".

      You obviously don't like order and just have everything placed in / ... right?

      --
      We do not live in the 21st century. We live in the 20 second century.
    2. 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.

    3. Re:Why? by Peter+Harris · · Score: 1
      I myself say Hmm now...

      dpkg on Debian is very reliable about keeping dependencies accurate and removing files correctly. It even distinguishes between "remove this package completely" and "remove the package but keep the configuration in case I need it again".

      You could decide not to trust it, and check every file yourself. I have better things to do.

      The reference to ini files in /usr/bin puzzles me. /usr/bin is for executables. All your .conf files are in /etc, ne?

      In fact /etc usually has subdirectories for anything with more than one config file. I don't remember ever seeing a .ini in /etc, BTW.

      There is a difference between a sense of order, over-eager or not, and actual order.

      --

      -- What do you need?
      -- Gnus. Lots of Gnus.
    4. Re:Why? by ggeens · · Score: 1

      There are 2 major flaws in the Windows uninstall process:

      1. Windows cannot delete files which are in use. Most of the time, this includes the uninstall program. (I've been told this is fixed in XP.)
      2. Most of the time, a Windows `package' includes shared DLLs. If these are used by another program, they cannot (and will not) be uninstalled.

      Under Linux, problem 1 doesn't exist. Problem 2 is solved by having separate packages for all shared libraries.

      Of course, this causes another problem: when is it safe to uninstall those libraries? The package manager keeps track of all dependencies and will refuse to uninstall something that is still needed by another package.

      For Debian, there is deborphan to hunt for unused libraries. I'm sure there exists a similar utility for RPM.

      --
      WWTTD?
    5. Re:Why? by Geekboy(Wizard) · · Score: 1

      yes it does. Add / Remove Programs

      Commense pointing and snickering

    6. 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.

    7. Re:Why? by Hektor_Troy · · Score: 1

      Well - I DID say, that I was far from a unix-buff ... did I not?

      So why does my lack of "common" knowledge puzzle you?

      --
      We do not live in the 21st century. We live in the 20 second century.
    8. 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.
    9. Re:Why? by lscoughlin · · Score: 1

      And what happens when your package database gets
      corrupted?

      Arguing strictly from the point of view of strong packagemanagement is so narrow as to be pointless as you accuse this entire thread of being.

      I'm still trying to figure out who thought you were "insightful" so i can make sure i never meat them.

      --
      Old truckers never die, they just get a new peterbilt
    10. Re:Why? by ArsonSmith · · Score: 1

      Damn thats funny!!!!! I wish I had mod points.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    11. 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?

    12. 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

    13. 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.

    14. Re:Why? by Anonymous Coward · · Score: 0

      > I would restore it from a backup, just as if a directory in my filesystem got corrupted or if my hard drive fried

      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)

      > 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.

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

      Stop kidding people, your post is not beleivable.

    15. Re:Why? by __aaklbk2114 · · Score: 0

      actually those problems are solved with .NET

      just copy a file to install, and delete it to uninstall.

      couldn't be easier.

      some of the linux distros might want to take notice. .NET has raised the bar for app development and deployment. they need to keep up if they want to stay afloat.

    16. Re:Why? by drsquare · · Score: 1

      What happens when the Windows registry gets corrupted? What happens when the kernel gets corrupted? What happens when your startup scripts get completely wiped?

      Anything can go wrong, but as long as you're sensible enough not to go fucking about as root, it shouldn't.

    17. 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.
    18. 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?

    19. Re:Why? by Tony-A · · Score: 1

      just copy a file to install, and delete it to uninstall.
      Ah, memories of DOS 2. Microsoft has sure come a long way ;-)

    20. 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.

    21. Re:Why? by castlan · · Score: 1

      While RPM and dpkg databases are very sophisticated compared to Windows Uninstall or Installshield, they are hardly all-knowing. Rather than tracking files, they know the files they own, that they installed.

      In Debian, each file can only have one owner. If more than one package claims to own a file, than an error is flagged. But that doesn't necessarily mean that every file on the system is owned. Even if you don't count files extracted from the base.tar during older installs, there are many files that are generated during or after installing a package. Any file generated by an install time script instead of extracted from the compressed package is not claimed by any package. The uninstall scripts still have to remove dirctories specific to their application if they want to try to fully remove all traces of the app. Mind you, this is in addition to configuration files in /etc that may or may not be purged.

      Windows Add/remove justs keeps track of files it explicitly installed. It then gives you the option to remove those specific files (or sometimes upgrade them). Debian is significantly more sophisticated in that it keeps track of dependancies, but it has yet to manage every non-user file in the system. So far, their stop-gap measure to manage this mess is the package cruft, which helps to scan the system for unclaimed files.

      So, even with package management as sophisicated as Debian's, in the end the administrator still has to manage the files. Package management cannot supplant proper filesystem layout (...yet).

    22. Re:Why? by Peter+Harris · · Score: 1

      OK sorry, just got a bit snide for a moment there. My wife has reported this personality bug long ago, although no fix is currently available. The work-around is not to take me too seriously :-)

      --

      -- What do you need?
      -- Gnus. Lots of Gnus.
  19. Read the article, THEN post. Please? by Hektor_Troy · · Score: 0, Informative

    Most people haven't read the article it seems. Allow me to copy the follow-up:

    A few followups
    The response to this commentary has been large and I've gotten a ton of emails, (mostly positive). A few things I think I should clarify. First of all, this seems to only be an issue in RH based systems - many Slackware and Suse users emailed me to say that their systems try to do the right thing. Second of all a few angry people questioned my qualifications to make the above commentary, and one person even called me a novice! Many people know who I am and that I've been involved in Linux for years, but I figure since most editorials state the author's experience I might as well, too. I'm a Unix and Windows developer, have certifications in HP-UX Systems Administration and Tru64 cluster management (TruCluster), and have been a either a Unix admin or developer since college. I've worked on free software for about 3 years and have been a Linux user since the 0.9x days. Last of all, a few users say I should just use RPM, usually stating something along the lines that I'm stupid and don't know how to use it. Nothing can be further from the case: I have a lot of experience with RPM both from a user experience and creating quite a few RPMs for Linux distributions in the past. Just because you have a package manager is no excuse for sloppy and lazy directory management.

    --
    We do not live in the 21st century. We live in the 20 second century.
  20. GNU and /usr/local by Anonymous Coward · · Score: 0

    All GNU software gets dumped into /usr/local/* by default unless you pass configure an option. That is probably why most of this /usr directory dumping started in the first place.

  21. Depends on what you do... by Mudge+Pinkerton-Bott · · Score: 1

    While I would be the first to admit that I hate having to hunt through screeds of files in a single directory by hand, most of us who operate *nix boxes of one colour or another on the desktop have far too many object files to make for easy digestion without having recourse to some kind of package manager, whether it be rpm, apt or whatever. I think only servers really can use the luxury of separate directories for everything nowadays.

  22. 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.

    1. Re:Use /usr/local for add-ons, keep /usr clean by ThatDamnMurphyGuy · · Score: 1

      This is one of the reasons I switched from Linux to FreeBSD for now while I'm still learning.

      The directory structure just seemed cleaner.
      Now, with a grain of salt, other Linux distros may be just as close..i just seemed to bond to FreeBSD quicker than Redhat, Mandrake, and Suse because of the directory structure, and a FBSD "minimal" install was just that..where as some of the others "minimal" installs still have lots of stuff by default.

    2. Re:Use /usr/local for add-ons, keep /usr clean by Daniel+Serodio · · Score: 1

      Package managers (or installation programs) shouldn't put anything under /usr/local, there's where programs compiled by hand should go. In fact, I think making a mess out of /usr/local is even work than /usr

    3. Re:Use /usr/local for add-ons, keep /usr clean by Beryllium+Sphere(tm) · · Score: 1

      That keeps /usr manageable, but still creates a situation which upset someone to the point that he added a complaint to his website:
      http://www.tinaa.com/rant/usrlocal.html

    4. Re:Use /usr/local for add-ons, keep /usr clean by Ikari+Gendo · · Score: 1

      ...except generally FreeBSD users compile their own software using the ports tree. Note, too, that not *everything* goes in /usr/local -- just the things you'd expect (java, console-based apps, etc). Other things end up in /usr/X11R6 under FreeBSD.

    5. Re:Use /usr/local for add-ons, keep /usr clean by Luminous+Coward · · Score: 1

      ls /usr/bin | wc -l

      ls will print several files per line. Therefore, it is pointless to count the lines. You would want "ls /usr/bin | wc -w" or "ls -l /usr/bin | wc -l" (only the first would yield the correct result).
    6. Re:Use /usr/local for add-ons, keep /usr clean by J.+Random+Software · · Score: 1

      Traditionally, /bin/ls only defaults to multi-column output if stdout is a tty. Does "ls|cat" look just like "ls" on your box?

    7. Re:Use /usr/local for add-ons, keep /usr clean by Luminous+Coward · · Score: 1
      Does "ls|cat" look just like "ls" on your box?
      You are right. "ls | cat" prints one file per line. Hey, I've learned something. Thanks!

      $ man ls

      -1 Force output to be one entry per line. This is the default when output is not to a terminal.

  23. 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.

    1. Re:Have a directory standard for applications. by spauldo · · Score: 1

      Sounds like solaris, in a way. For major apps, that's not too bad.

      For all apps, good gods that's horrible. I remember doing my first solaris install... /opt was a mess. Nowdays I don't install anything solaris doesn't need (that it will let me not install anyway) so it's not as painful.
      Could you imagine _every_ one of the GNU utilities having their own subdirectory in /opt? Argh...

      --
      Those who can't do, teach. Those who can't teach either, do tech support.
  24. 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).

  25. 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 Vairon · · Score: 1

      So, does that mean I would need a seperate partition for X, gnome, kde, sawfish, etc.

    3. Re:Translucent file system by gregRowe · · Score: 1

      Are there any implementations of this? This would be excellent. Perhaps plan9 implements this? Anyone know?

      --
      There\'s no place like ~
    4. Re:Translucent file system by Anonymous Coward · · Score: 0

      Sure, then you can realign the dilithium matrix while your setting up your translucancy factor. Transalucent, mrashslucent. You still have the exact same problem - but worse - potential name collisions and unwanted additions.

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

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

      --
      Choice of masters is not freedom.
    6. 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?
    7. 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?
    8. 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.

    9. Re:Translucent file system by gregRowe · · Score: 1

      I thought plan9 revolved around the idea of a seperate namespace per process (which is really cool). But that wouldn't let me have

      /usr/bin
      -and-
      /home/greg/bin

      with a path of
      PATH=/usr/bin

      and some commmand like:
      mergeDir /home/greg/bin /usr/bin

      And let me execute something in /home/greg/bin as though it were in my path.

      --
      There\'s no place like ~
    10. 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.

    11. 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.
    12. Re:Translucent file system by Make · · Score: 1

      If you use Linux with kernel 2.4 or above, you can mount a single partition multiple times - using the '--bind' parameter for mount (man mount) - this allows you to mount a subdirectory of an already mounted partition again. Combined with the BSD feature of translucent file systems, this would be a cool solution ;)

    13. Re:Translucent file system by wobblie · · Score: 1
      well the above sounds nice but it also sounds like a mess. Part of what I like about linux, as opposed to windows, is the fact that different types of data are all neatly partitioned - compare to the mess in windows, which has no FHS, and everyone just puts anything wherever they want.

      A lot of what mosfet is complaining about would be solved by separating things like KDE and GNOME (and alos certain very large applications such as mozilla and star office) away from the rest of the system. I dislike having $KDEDIR=/usr as well - it's a mess. I'm not saying it should go in /opt like SuSE does (this is fairly contentious issue) but at least in /usr/kde-version.

    14. Re:Translucent file system by neurojab · · Score: 1

      This sounds absolutely dreadful. How is this "translucent mounting" going to be managed? Probably with some God-awful XML file, (with a grammar in Esperanto). Sounds like the performance would fall throught the floor as well... How many disk reads is it going to take to find your binary? PATH makes optimizing that easy. Translucent filesystems... jeez. Why not just make the filesystem a network-transparent CORBA object... making all the file requests pass through the nameserver! that way you could have enterprise-wide namespace conflicts! ;)

    15. 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
    16. 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
    17. 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.

  26. 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 Anonymous Coward · · Score: 0

      Hear hear. Fantastic idea - it'd be just like RiscOS on the Acorn Archimedes - any directory with a ! as the first character would get turned into an "application package", and then "running" that directory would run the file !run inside it. And setting the equivalent of $PATH was just as easy (obey$dir, if memory serves me correctly)

      I'd LOVE this facility on UNIX...

    2. 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.

    3. 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.

    4. Re:I wish unix had this... by cpt+kangarooski · · Score: 1

      Not nearly so elegant or useful as forks/streams, however. G'wan -- tell me how your lame OS X application bundles could be made to work with a file that has to be accompanied by several font files (to support the fonts used within), backup milestones of previous versions of the document, and original objects, e.g. raw scans that were used as source material for the main document?

      Use symlinks to avoid unecesarily duplicating space (but with the ability to fork the links into seperate files if changes are made to the master) and a well-designed interface for mucking with the guts, and you'd have a far superior solution.

      I agree -- apps should be single, apparently indivisible icons, but there are compelling reasons to do the same elsewhere too.

      --
      -- 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.
    5. 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.

  27. Linux is just different, is all... by wrinkledshirt · · Score: 1

    One of the things about the proliferation of Windows is that people get used to a filesystem is generally organized by individual software entities. On Linux, it's organized by software type. Generally. Of course the rule gets broken both ways, and the Windows Directory throws its own set of curveballs, but for the most part, that's the way it goes.

    The latter basically means that your source isn't always in the same place as the executable which isn't always in the same place as the libraries which isn't always in the same place as the documentation which isn't always in the same place as the user .conf files...

    Tomayto Tomahto. You get used to it. It would help if all the vendors got together and enforced the LSB on themselves, so that a common way of doing things with the filesystem would become a practiced standard in its own.

    But really, in the end, you just get used to it, and Linux has usability problems in other areas that the community should probably look into before worrying about this one.

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

  28. 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 vrt3 · · Score: 1

      Sounds truly interesting. I suppose you don't have any links yet?

      --
      This sig under construction. Please check back later.
    6. 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.

    7. Re:Related to yesterday's story by vrt3 · · Score: 1
      Yeah, I think such a system would really rock. And indeed, perhaps it's not too difficult to implement and to provide backwards compatibility using symlinks.

      Who knows, if I think about it some more I might even try to implement as a Linux userland file system driver... But the loose thoughts need to crystalize some more before I can even think about designing it.

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

      Sounds truly interesting. I suppose you don't have any links yet?

      Sorry, no. The only thing that's close to release is a related framework component, STEnterprise (heh, let's see if we get sued for that name :-), which is intended to be a database independent object persistence layer (needed by some of the specialized managers in the MOM) intended to address the fact that Apple has mishandled EOF. That's due out at the end of the month, but it's not a major part of the STMOM framework, which is the core of Mary and MaryTool (the command line version).

      Since there is growing interest in an updated user experience, I can provide a few links that I found inspirational in my work on Mary as a MOM.

      • The Anti-Mac Interface got it right in 1996, but we didn't have the vast datastore on the desktop to make it worth it, or the processing power to make it happen.
      • Liquid File System, insightful enough for me to say "screw it" to my own white paper and just implement the damn thing. :-)
      • Placeless Documents, an excellent paper, as you might expect from Xerox PARC.
      • SQLite, useful if you need to release software that would benefit from a database on a system that might not have one.
      • Shore, which interestingly can have the object store accessible using directory navigation, addressing some migration issues.
    9. Re:Related to yesterday's story by jijoel · · Score: 1

      I've been contemplating this for a while now. The existing heirarchical file system breaks down in a lot of cases. Having a keyword-based filesystem has the potential of working a lot better, especially if the computer is capable of generating most of the keywords. For instance, "pictures" would get all of the image files on the computer, while "my pictures" would get all image files under ~, "my pictures 2000" would return all pictures under ~ taken in 2000. All of the metadata needed to do this can be generated automatically by the computer, with one keyword "Hawaii" needing to be entered by someone for a "my Hawaii pictures in 2000."

      With a keyword-based filesystem, it would also be possible to exclude files unless a particular keyword were entered. For instance, "my Hawaii pictures in 2000" might return a list of files, while "my Hawaii pr0n pictures in 2000" would return a completely separate list. The keyword "pr0n" might even be used by the computer as a flag to request a password before returning anything.

      I like the idea a lot, though there are some tricky parts. It seems that having no directories or symbolic links will make it difficult to refer to one file from another, because files wouldn't necessarily have unique names. (eg, there may be a hundred different files called index.html on the computer; how do you tell which one gets linked to?)

      Have you come across this? If so, how have you dealt with it? Also, do you have Mary on an FTP site somewhere? I'm very interested in it.

    10. Re:Related to yesterday's story by droleary · · Score: 1

      I like the idea a lot, though there are some tricky parts. It seems that having no directories or symbolic links will make it difficult to refer to one file from another, because files wouldn't necessarily have unique names. (eg, there may be a hundred different files called index.html on the computer; how do you tell which one gets linked to?)

      Actually, the file name (and extension) is really just considered another bit of metadata, too. Items are fundamentally uniqued by their content (usually with an md5 checksum generated off the data in the file, but even that is a just a derived metadata value). From the user perspective, files are usually identified by their attributes and values, and giving a specific enough focus results in a single file. If you want a file to appear in another focus (akin to appearing in another directory), you assign the appropriate metadata to it. So if you happen to like sunset images for your screen saver and one of your vacation snaps happens to be a sunset, you just give it that metadata value and there it is in your screen saver, too! I'm not seeing how it gets tricky; perhaps an example might clear things up?

      Also, do you have Mary on an FTP site somewhere? I'm very interested in it.

      I don't think it's quite ready for public consumption. Bits and pieces will be coming out over the next few months, as noted in another reply. It's also only going to be available for Mac OS X until the kinks are worked out and I can use GNUstep to get out a Linux version. Anybody who is interested in this should probably drop me an email and I can send out a note when an beta version is ready for testing. I'll be happy to hear your suggestions and potential uses to keep in mind as work progresses.

  29. 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.
    1. Re:Keeping one applications files in one place by Anonymous Coward · · Score: 0

      or you could use Windows... *duck* *cover* *run*

    2. Re:Keeping one applications files in one place by Espen+Skoglund · · Score: 1
      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.

      You shouldn't forget that another reason for splitting stuff up in bin/, share/, etc., is to allow certain directories be shared among multiple nodes in a cluster. E.g., "bin/" can be shared among same hardware platforms, "share/" can be shared among different platforms, "etc/" can not (in general) be shared, etc.

  30. 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.
    1. Re:RiscOS... by Captain+Pedantic · · Score: 0

      ROX-Filer does something like this, which is really what you should be using to manage files if you liked RiscOS.

      The author has written a freshmeat article explaining all this in more detail.

      --

      None are more hopelessly enslaved than those who falsely believe they are free. Johann Wolfgang von Goethe.
    2. Re:RiscOS... by mirko · · Score: 1

      ROX is actually a little too far from this approach even though I reckon he follows it, hence his name : "Risc OS on X".

      --
      Trolling using another account since 2005.
    3. Re:RiscOS... by posmon · · Score: 1

      yup, i remember it well. virii in the !boot files, so you could be infected just by *looking* at the contents of a disk, not being able to open a document until the filer had 'seen' the associated application...

      --

      update comments set karma=-1, reason='offtopic' where sid=26315

    4. Re:RiscOS... by cpt+kangarooski · · Score: 1

      Out of curiosity do you have some screenshots of the interior? I'd like to know if it was just raw directories and files, or if there was some attempt at making it accessible and usable for people, along the same lines of thought as making the container executable.

      --
      -- 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.
    5. Re:RiscOS... by jonathan_ingram · · Score: 1
      Try it yourself (as long as you have Windows):

      Get the RISC OS 3.11 ROM image from: http://www.geocities.com/SiliconValley/Lakes/7207/ ROMs.htm
      Get the Red Squirrel Archimedes emulator from: http://www.red-squirrel.org/

  31. Laziness is a virtue by scott1853 · · Score: 1, Troll

    Linux developers are geeks. They know that the only people that use their products are going to be geeks. Hence the end users will understand the laziness.

    Of course I can't help but think that too much laziness is keeping developers from working towards making Linux a desktop competitor.

    Not flamebait, not a troll, just a comment.

    1. 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.

    2. 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.

  32. So what...? by dabadab · · Score: 1

    I've got 1200+ files under /usr/bin. That has caused no headache for me so far.

    Anyway, if every package would have its own directory, there would be nearly 600 dirs. How would that be any better?

    And, I should add, /usr/bin is not where an "application" resides. It is the place where the executables are. If you are talking about a whole application, it will have files likely at other places: /var, /etc, /home (for user-specific configuration), etc

    So, this guy fails to state what is this problem (having a lot of files in a single dir is not a problem: the fs can handle that) and it is absolutely not clear how having separate dirs would give any advantage over the current situation - though it is absolutely clear what the disadvantages would be (having fscking long PATHs).

    I would moderate him -1, drunk babbling, if I could ;)

    --
    Real life is overrated.
    1. 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.

    2. Re:So what...? by Anonymous Coward · · Score: 0

      you have 600 programs that you would need to have seperated? Damn man. Just put the ones you need as a front base in a folder and the rest in a common one like all other sane people.

  33. 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.

    1. Re:Um, so? by Score+Whore · · Score: 1

      That's stupid. There's no reason that any enviroment variable should have an upper limit, short of actual physical constraints on the system.

  34. 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!
  35. 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 dmelomed · · Score: 1

      Gee, thanks for offending me as a systems administrator, thanks! Here's what djb has to say about this known *nix problem, which I think is very sound:

      compatibility

      look under FS layout

    2. 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
    3. 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.

    4. Re:UNIX is a mess in multiple ways by dmelomed · · Score: 1

      It won't work unless we agree on a standard.

    5. Re:UNIX is a mess in multiple ways by drsquare · · Score: 1
      +5 insightful? More like -3 idiotic.

      In other words because of genuine lazyness

      Yawn. No, it's a very logical system. It works.

      ou have around 2000 executables in your /usr/bin directory

      And your problem with this is...? Unless you're some idiot who spends his time using his file manager to browse /usr/bin, I don't see how this is anyway a problem.

      Generally a program's related files are scattered through out the system.

      It's becoming increasingly obvious you know very little about Unix. Files aren't "scattered". They're placed in consistent and logical places:
      • /etc: Configuration files
      • /usr/bin: Executable binary
      • /var: Temporary/dynamically natured files.
      • /usr/lib: Libraries
      etc.

      Just making things consistent

      How can it be any more consistent?

      Here's a sample better solution for the problem (inspired by mac os X packages): give each app its very own directory structure

      WHY??? Everything works fine as it is. All this would accomplish is making backing up impossible. At the moment, you can just back up /etc. Using your system, you'd end up having to go through every single directory trying to hunt down config files. To see an example of this, have a look at MS Windows. Each app has its own directory, and finding config files etc is next to impossible.

      you no longer need package managers

      What on earth have you got against package managers? How else would programs be installed? Each program having its own installer? They do that on Windows, and as a result Windows is a complete mess. Programs get installed all over the place, configurations are scattered all over the place, and as for resolving dependencies, and cleanly uninstalling apps, just forget about it. Just does to show how the lack of a package management system leads to complete chaos.
    6. 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

    7. 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
    8. Re:UNIX is a mess in multiple ways by Macka · · Score: 1


      I agree that it's consistant to have one or two directories that your path consults to find programs to run, like /usr/bin and /usr/local/bin, but I don't agreee with your assertion that all programs should actually live in those directories themselves.

      It is neater, cleaner and more easy to manage when applications are given their own dir tree under /opt or /usr/opt and are then sym linked into /usr/bin or /usr/local/bin.

  36. Folder? by Griim · · Score: 1

    Well, traditionally under both Unix and DOS you used subdirectories to group related files. So Microsoft Office got it's own folder, CDE got it's own folder, X Windows got it's own folder, Oracle got it's own folder...

    What's a folder?

    1. Re:Folder? by Space+Coyote · · Score: 0

      What's a file?

      --
      ___
      Cogito cogito, ergo cogito sum.
    2. 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.
  37. 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!
  38. 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.

    1. Re:Don't install so much stuff! by fizz-beyond · · Score: 1

      Here Here!! that's what I'm working on... actualy I have to admit I'm working the other way around... I installed everything that "looked cool" way back when with the hopes that I'd actualy use it... now whenever I rup deselect update and see a package that I've never used has a new version I usualy un-install it because I know I'll never really get around to using it.

      --
      Blink
  39. 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.

    1. Re:Hierarchy by Anonymous Coward · · Score: 0

      Shit, man, just use FreeBSD. Install the base system and the ports tree, and if you need a particular app, find its directory in /usr/ports and do a make install. How fucking hard is that?

  40. solution is obvious.... by DrSpoo · · Score: 1

    Instead of having 2000 programs that do only very specific things, have 1 program that can do everything. Think Microsoft Word for instance...

    QED.

    --
    Sig (appended to the end of comments you post, 120 chars)
    1. Re:solution is obvious.... by Anonymous Coward · · Score: 0

      I just use the posix compatible interpreter I wrote in word basic to run unix programs...

      much much easier

    2. Re:solution is obvious.... by Anonymous Coward · · Score: 0

      Or Emacs for that matter...

  41. A partial solution by keath_milligan · · Score: 1

    I think one of the big problems here is that all kinds of stuff ends up in /usr/bin, /usr/local/bin and other "catch-all" locations that really don't need to be there.

    I'd prefer to see only commands that I am likely to use from a shell in /usr/bin - everything else should go somewhere else. Major applications like Mozilla need to be in their own directories - you shouldn't need to have these in your path since you're likely to launch them from buttons on the panel.

    Microsoft is just now getting around to addressing a similar issue in Windows - for years, developers have dumped application-specific DLLs in \winnt\system32 for no good reason. Now they are strongly discouraging this.

    This issue stems primarily from the simplistic path-searching mechanism shared by pretty much every OS out there. Either you dump tons of crap in standard locations like /usr/bin or you have a PATH variable a mile long. Perhaps there is an opportunity for a technical advancement here...

  42. Re:The Alternative? (do we actually need one) by A_Milne · · Score: 0, Flamebait

    Do you really need to have all your apps in the path at all.

    I mean Their are hundreds of apps that are installed that I (you?) will never use. I dont really need them in my path as long as their is a logical place to find them.

    So if I have a good directory organisation, and then only add to my path the apps I really want to use a lot/quicklly (ll, vi, emacs, nedit, aCC, perl etc).

    The rest I can just refer to by full path. Its not much harder to type /usr/sbin/swlist.

    Stupidlly complicated sugestion update the shell to add any command you run to the path and keep it their until its been unused for a week. So first time I enter /usr/sbin/swlist. After that if I keep using it its just swlist.

    Andrew

    --
    Flame my comments, not me.
  43. Why we have common directory paths in UNIX by Anonymous Coward · · Score: 1, Informative

    There are probably some very valid reasons for the way UNIX does things. For example, manu application binaries and related files are shared between different applications and used with others because software is often cooperativily developed between vendors rather than in isolation the way windows stuff is typically developed. As a result, sharing of common resources, libraries, etc, is much easier to achieve.

    Also, most complex sites may use different kinds of nfs partial mounts on a file system. For example all of "/usr/share" may be off a single master nfs server, but /usr/bin might come from from a cpu architecture specific machine. To do this in /opt/packagename would mean all kinds of nfs 'micro-mounts' for portions of each applications tree. Having a common set of directory trees for applications rather than package specific ones makes it much easier to organize role specific network mounts.

    Of course, most of the current package management systems do not seem to understand the concept of role specific filesystem mounts. It would be nice if I could install a rpm for my /usr/share portion on my master nfs, without it also installing bin, etc, and having it install my /usr/bin or whatever portion on workstations or my cpu specific nfs servers without it installing /usr/share and such. Having a master config file in /etc that can explain this kind of usages to package managemement systems that can be setup on these machines would make that much easier to accomplish.

  44. OSX as a guide? by Anonymous Coward · · Score: 0

    MacOSX seems to go about this by using bundles & frameworks. Applications have the ".app" extension and are actually directories (this is made transparent to a user). Within the app is a standard directory structure consisting of the application components. Libraries (aka. frameworks) do this in a similar fashion. In fact, frameworks encapsulate different library versions and API documentation within a framework. ARS technica has a nice description here

    1. 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.
    2. 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.
  45. 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!
    2. Re:the problem is deeper by G+Neric · · Score: 1

      that post you are responding to went into a lot of detail about all the places that files live, and all of the other places that reference those files... do you really think that the existence of a --relocate switch on rpm indicates that the rpm implementors thought through the implications fully... would you run rpm with --relocate on the command line without worrying that it would trash something you didn't anticipate, and with an assuredness that it would work? how many times would you need to put --relocate on the command line to make sure that the lib files didn't overvrite anything, and that the bin files didn't overwrite anything, and that the etc files didn't overwrite anything, and the var files didn't overwrite anything, and the X files didn't overwrite anything. Then, you're sure the app would run? and it would work because you'd manually edit your PATH and your LIBPATH and your MAN path and your... do you really think that the problem is solved?

  46. 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 schwaahed · · Score: 1

      Couldn't $PATH be expanded with a variable to include those subdirectories? something ala:

      PATH=/bin/:/usr/bin/:/usr/local/$APP/bin

      where $APP would be whatever you are calling on the command line.

      APP=mozilla

      This way the majority of the filesystem is left alone and the path isn't too long.

      I am not sure how to do this off the top of my head but I will try to figure this out today.

      -s

    2. 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'?

    3. Re:Regarding paths... by schwaahed · · Score: 1

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

      No I am talking about writing a script that updates the $PATH variable everytime you enter something on the commandline to look for that command in the:

      /usr/local/$APP/bin directory.

      In this case:

      mozilla=/usr/local/mozilla/bin/mozilla

      It might be tricky to get it to work 100% but a few it doesn't seem to be impossible.

      -s

    4. 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.

  47. 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.

  48. File Systems We Dont Need No Stinking File Systems by oldstrat · · Score: 1

    USE FORTH - REAL FORTH, not some hack that sits on top of a host OS. FORTH is the OS, the Language, and the File System.

    I won't go so far as to say FORTH is God, but I will bet that God uses FORTH.

  49. grep by Anonymous Coward · · Score: 0

    As long as I can use grep, I don't care how many files are in /usr/bin.

  50. 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.

  51. 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.

    1. Re:KDE binaries in /usr/bin by Anonymous Coward · · Score: 0

      No it doesn't. If you configure KDE3 with --prefix=/opt/kde3, you can have both. (Headers are more difficult, though)

  52. 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

  53. Answer - "SysV-like" $PATH by oracleofbargth · · Score: 1

    An easy way to keep different applications separated into their own directories, and not have a nightmare managing $PATH would be to create something like /etc/path, which would contain several little files, one for each application, each of which would append its own entry to the $PATH variable. Then, all entries in /etc/path could be parsed on login (in a SysV init sort of manner). Just call some path-init script from the system profile, or bashrc, or whatever.

    This would make things easy for package management too, since all you would need to do to remove a package would be to delete the unique directory the application lives in, then remove the matching path script from /etc/path.

  54. no. by Anonymous Coward · · Score: 1, Informative

    PATH is always explicit.

  55. 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
    1. Re:wolfenstein test does it right! by Anonymous Coward · · Score: 0
      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.

      o Games are not to mess around with a system directory and /usr/bin is one.

      o The chances of name clashes is going to increase over time.

      All our Unix installations here, big ones, do not have more than 600 files in /usr/bin. It just looks typical PC like to me, just keep shitting all over the place and re-install once it's become messed up enough.

  56. 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

    1. Re:FreeBSD by Anonymous Coward · · Score: 0

      FreeBSD is such a clean and elegant unix... which makes it the choice of folks who want a stable, predictable unix that can be taken for granted. Linux is such a cacaphony of stuff piled upon stuff piled upon stuff, etc, which makes it a magnet for the geeks and tinkerers such as you'll find here in slashdotland.

    2. Re:FreeBSD by netsplit · · Score: 1

      If I had a list of reasons why I choose FreeBSD over Linux for servers (and for workstations), this would be in my top 3.

      ... and if I had a list, I would not let it start a flame war =)

    3. Re:FreeBSD by StupidEngineer · · Score: 1

      The distinction is subtle. libexec is for daemons and sysutils executed by other programs. That is, they aren't called directly by a user. Here is the chapter from the FreeBSD Handbook about directory structures.

  57. You're off base lumping in Slackware and Solaris by slashdot_commentator · · Score: 1


    The problem is not bad on Slackware. It includes an /opt directory, where it puts gnome and KDE. There still may be lots of programs in /usr/bin, but I would not want a subdirectory for every executable either. It would be nice if it separated gcc in /usr & /lib (and separate /lib directory for apache), but that would be the only gripe concerning this. Solaris is even more disciplined than Slackware in this regard.

    I thought the article was lame, but I think its worse to erroneously criticize UNIX distributions that do a better job of segregating software packages than Red Hat.

    --
    There is no America. There is no democracy. There is only IBM and AT&T and DuPont, Dow, General Electric, and Exxon
  58. Why not have namespaces in file systems? by Anonymous Coward · · Score: 0

    If we invite concept of namespaces in file system, we can then set, for example
    namespace staroffice
    and then see only executables in staroffice::/usr/bin
    that related to that package.

    Denis

    1. Re:Why not have namespaces in file systems? by BJC · · Score: 1

      Wow... In other words, almost exactly as the Acorn (BBC) micro did it before they used subdirectories!

    2. Re:Why not have namespaces in file systems? by maunleon · · Score: 1

      Or you could name your namespaces A, B, C and you could have a:/usr/bin, b:/usr/bin, c:/usr/bin..

      Sounds vaguely similar to another OS, no? :)

  59. 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.

  60. /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
    1. Re:/usr/bin for different OSen by AshPattern · · Score: 1

      Typical installation for Slackware 8.0:
      $ ls -l /usr/bin | wc -l
      902

  61. 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

  62. Why oh why? by Hard_Code · · Score: 1, Troll

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

    WHY do we need all these directories? The explanation of /usr/local is that it is used for distributions of software "local" to a particular network (e.g. for administration ease). This might have some place in a farm of servers, but what place does it have on a desktop machine??

    And what sense does /usr/sbin make? If it is a *system* binary, what is it doing in a /usr volume? Ok, I admit some of these distinctions may be for technical reasons of partitioning, distributing volumes accross disks, whatever. But really, that is the file system's problem, not the users problem. File hierarchy should be completely independent of being able to maintain integrity of the file system. I should be able to format one humongous honking partition and have the file system take care of the rest...not bother myself with cutting my file system into different fixed-sized partitions. What is this, DOS and FAT12??

    Here's something radical (and instantly distasteful because of its analog in Windows)

    /system/conf
    /system/bin
    /system/...
    /programs/bin
    /programs/conf
    /programs/...

    BLAM! Done. No /usr, /usr/local, no /etc with a pile of random configuration files. And for chrissakes, no /usr/local! Modern filesystems should be able to merge-mount remote filesystems (e.g. into /programs)...or just put them into /programs/remote/ or something, or some entirely different path. Really I haven't seen an adequate rationale for /usr/local being used for software "local" to a network. What it usually is used for is software that is installed ad-hoc by users, and /programs will serve just fine for that.

    Stop the insanity.

    --

    It's 10 PM. Do you know if you're un-American?
  63. What's the problem by jeff_bond · · Score: 1

    Personally, I don't care if I have 2000 binaries in /usr/bin. All I care about is that the programs work, and I sure don't want a monster PATH variable, or have to worry about 2000 symlinks in /usr/bin.

    What do people have against package managers? I have no problem with RPMs. I don't want to fiddle with my system, I just want to use it to do work.

    Jeff

    --
    stty erase ^H
  64. 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.

  65. Multiple partitions by vrt3 · · Score: 1

    What I don't see in all the other comments is what I always thought to be the biggest advantage of putting all binaries in /usr/bin etc., logs and spools etc in /var: the ability to put files on different disks/partitions based on the kind of access. Easier for backups etc.

    --
    This sig under construction. Please check back later.
  66. Would Love New File System Standard by doodaddy · · Score: 1

    I read the Linux file system standard with some hope about a year ago and came away disappointed. It wasn't a thought-out organizational model. It was a justification for every single directory that has ever been created on any system! This is not what I had hoped for with the concept of "standard," i.e. design by years of committee.

    I'd love to see a new, orderly, and well-reasoned standard. It would start with the competing interests of the system itself (such as read-only areas and binary areas and what not), cut to the core of necessity, then come up with a suitable hierarchy, leaving most of the play space in users's homes.

    I hate to say it, but the Windows file standard is better, sadly.

  67. Who cares how many files are in /usr/bin? by Nelson · · Score: 1
    Unless you're manually adding and removing them what does it matter?


    I'd like to keep things as clean as possible but that's kind of the nature of UNIX. Just the fileutils and textutils dump around 100+ files there and you're not doing anything interesting yet. /usr has become "stuff that comes on the CD" with lib and bin being full of thousands and thousands of files. /usr/local/ and /opt are where I put my crap. Since KDE, GNOME, etc.. all come with most Linuxi now then shouldn't they go in /usr/bin? Or should we add /usr/gnome /usr/kde and 600 other paths for every project out there?

    1. Re:Who cares how many files are in /usr/bin? by Anonymous Coward · · Score: 0

      KDE is significant enough to warrent its own directory. It has no business being mixed in with all the crap in /usr/bin. Traditionally in UNIX only commandline applications go in /usr/bin anyway.

  68. Big deal... by night_flyer · · Score: 1

    I have 5500 files in my .mp3 directory :)

    --


    Thanks to file sharing, I purchase more CDs
    Thanks to the RIAA, I buy them used...
  69. -1, Troll by tjansen · · Score: 1, Flamebait

    If the article was a comment I would moderate it "-1, Troll". It's a stupid discussion that nobody needs, the question has been asked a thousand times..

    The author doesnt even have a point, saying "if I would not use a package manager it would be a mess". Well, he uses one, so it's not a problem. And if he didn't he could easily put each package in a single directory and create the world's longest environment variable.

  70. bin exist for a simple reason by maroberts · · Score: 1

    You can make them read only so hackers cant modify them.

    Who gives a damn how many files are in the bin directory provided
    a) there's no performance loss
    b) a decent package manager exists?
    c) your partition is big enough

    That said I do prefer packages to install in their own private dirs and have symlinks from the bin directories.

    --

    Donte Alistair Anderson Roberts - hi son!
    Karma: Chameleon

  71. 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.
    1. Re:Clueless... by k8to · · Score: 1

      I know I'm just rising to the bait here, but your comments re distro compliance are totally wrong.

      SuSE passed the entire compliance suite for LSB (including the FHS stuff) with one or two issues, compared with hundreds for other distributions over a year ago. /sbin/init.d went out quite some time ago after discussions with the LSB committee about issues involved.

      Not to mention that the LSB of that time very specifically suggested that programs of all kind were not to be in /etc. Interprested in a traditional UNIX sense, this could prohibit scripts. Also, there was a significant SySV tradition of locating init.d scripts under /sbin. Feel free to look it up!

      Anyway, SuSE remains the most compliant distribution to the FHS and the LSB in general. You don't have to like SuSE, but don't open your mouth and spew ignorance. It isn't pretty.

      --
      -josh
    2. Re:Clueless... by nessus42 · · Score: 1

      I've administered networks with hundreds of Unix computers on them, and I've done a good job at it. It is you who are clueless, not Mosfet, who is on the mark. First of all, Unix shells cache path entries. Furthermore, you apparently haven't heard of symlinks.

  72. Talk about a waste of enviro space... by bruns · · Score: 1

    And he thinks having a PATH which is 7k in size is any better? Comeon, things are laid out in /usr/sbin, etc for a reason. We know stuff in /sbin and /bin are required for most systems' operation, /usr/sbin is system management and secure tools (sometimes, I think), /usr/bin for common apps, /usr/local/bin for local binaries, etc.

    In theory, I could nfs export /usr/bin, /usr/sbin, /bin, /sbin and let other machines of the same type mount it and have only system specific stuff in /usr/local. Thats some of the intention behind this setup...

    --
    Brielle
  73. 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 Adam+Bauer · · Score: 1

      I do agree with you, though it would be wise to point out that in ME, 9x, etc all users were running as "Admin" anyway (because they just had full access to everything) - XP is no worse in this respect.

    4. 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.
  74. why not effective use symbolic links?? by fz00 · · Score: 0

    what i usually do is i build the code myself in a directory under /usr/local say and then have symbolic links to the binaries in the "standard" directory. this makes the filesystem more managable but also makes everything accessible to the path, which would be a pain in the ass to update everytime... not to mention very long. isn't that what symbolic links were basically meant for???

  75. 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.

  76. 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.

  77. 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.

  78. 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.

  79. 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.

  80. 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.

  81. 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
  82. RTFM: try 'man hier' to see how it SHOULD be by Anonymous Coward · · Score: 0

    (If you are unfortunate and are not running BSDhttp://www.freebsd.org/doc/en_US.ISO8859-1/book s/handbook/dirstructure.html

    $ man hier

    NAME
    hier - layout of filesystems

    DESCRIPTION
    A sketch of the filesystem hierarchy.

    (..snip..)

    -- Windows or Linux? Nah, I'll use a real OS (BSD)

  83. Well Said... by sn0wcrsh · · Score: 0

    The reliance on "package managers" is a crutch that can ultimately doom an OS. Windows is a classic example of this, with its program install/uninstall features that frequently leave cr@p all over your hard drive. This is acceptable for workstations and personal computers, but is unthinkable in a server environment.

    On a personal note, I much prefer doing a 'rm -rf' on a directory that having to trust a package manager to auto-magically get it right.

    What makes linux elegant is its simplicity. To stray too far from this is to miss the point.

    PS: SuSE and Mandrake are not the panacea that some people make them out to be.

  84. From a fairly simple solaris enviroment: by Anonymous Coward · · Score: 0

    $ uname -a
    SunOS mochila 5.8 Generic sun4u sparc SUNW,Ultra-5_10
    $ ls /usr/bin | wc
    549 549 3681
    $ ls /usr/openwin/bin | wc
    236 236 2022
    $ ls /usr/local/bin |wc
    836 836 7543

    And Solaris' package management is useless. I fail to see how this is an improvement.

  85. # 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.
    1. Re:# rm -ff /usr/bin by shoemakc · · Score: 0
      And Windows != /usr
      Program Files == /usr
      Er....not quite.

      C:\WINNT\system32\calc.exe
      C:\WINNT\system32\cdplayer.exe
      C:\WINNT\system32\mplay32.exe
      C:\WINNT\system32\sndrec32.exe
      C:\WINNT\system32\sol.exe
      C:\WINNT\system32\winmine.exe

      These don't look like files essential to boot windows.

      Man....If solitare gets corrupted I'm screwed.

      -Chris

      --
      --an unbreakable toy is useful for breaking other toys--
  86. 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.

  87. boy am I glad by Anonymous Coward · · Score: 0

    boy am I glad I'm not running linux. 1,500 binaries in /usr/bin? BTW, I was looking at mandrake, and all the binaries in /bin were linked to libraries in /usr !! That's amazing, I'm in fear of what other ways they found to break unix.

    FreeBSD has had their file organization figured out since 1993.

    (sure, mod me troll - but it's still true)

  88. 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 omega9 · · Score: 1

      I'm at work now and and rereading this thread and have realized that I may have fallen victim to a troll trap. If I have, you got me. If not, you have natural troll like ablities and should consider applying for troll status.

      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.

      Please stop this trend before it is too late.

      I should have recognized that on the first go.

      --
      I'm against picketing, but I don't know how to show it.
    3. 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
    4. Re:The /var directory is in bad shape too by omega9 · · Score: 1

      If I didn't fall victim to a troll before, I have most certainly fallen victim to my own ignorance. I was prepared to march into this replay with "Well, I'm sitting in front of a stock RH 7.2 and it's symlinked!", but, unlike before, I did enough research to find out I'm wrong. I did at least open a shell and check on the box I was on at work (a RH 7.1 box), and it was symlinked. However, I failed to remember that just a few weeks prior I had hand compiled and installed Apache myself, only to symlink /var/www to /usr/local/apache/htdocs myself. I guess my subconscious knew the correct answer, it just wasn't sharing it with me or I wasn't paying attention.

      So: A formal apology to the forum for letting my ego get the best of me.

      Regardless, you make a more valid point with the mention of the other data stores inside /var. Theoretically, you could transplant all of that data into a different location and then symlink it back, slowly deprecating/changing configuration files that point to the old locations. I guess it would be nice if RPMs were rigged to offer you a choice of installation points.

      --
      I'm against picketing, but I don't know how to show it.
  89. 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
  90. 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 Nailer · · Score: 1

      Oops, I do believe that `touch' is supposed to be a `mkdir'...anyway, point still stands.

    3. 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

    4. 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.

  91. I agree by Anonymous Coward · · Score: 1, Insightful

    I think the way to fix the problem is the following. Add subdirectories to "/usr/bin" (and "/usr/lib", etc). You would have a directory for "/usr/bin/gnome", "/usr/bin/kde", "/usr/bin/X11R6". Eight to thirty-two subdirectories would yield a highly organized file structure. And you would only have to add eight to thirty-two directories to your path.

    I'd rather subdivide this way than the windows way. That is I'd rather have:

    "/usr/bin/gnome"
    "/usr/lib/gnome"
    "/usr/share/gnome"

    than:

    "/usr/gnome/bin"
    "/usr/gnome/lib"
    "/usr/gnome/share"

    This way a smart path system could be setup, where every subdirectory under "/usr/bin" is in your path.

    -Nathan

  92. This is an old problem by rpk · · Score: 1

    or maybe it's not a problem, as others have discussed -- a lot of people like having lots of things in a path directory instead of a very long path. At my employer we use a system that puts packages in different directories, and it's very nice (it searches a database and takes versions and platforms into account), but occasionally other tools complain about the very long paths that result. I also ended up writing a little Perl script that searchs for patterns in the contents of PATH-like variables in order to get a better grip on exactly where things in my environment are coming from.

    You must put things on the PATH for command-line purposes, although a desktop environment or package shouldn't require this. I don't use X-like environments for GUI tasks so I am unfamiliar with the approaches that they take to this problem. The related problem is that dynamic libraries also need to be searched as well, so sometimes even GUI packages need to modify the environment.

    The nice thing about a big PATH is that less things have to know about exactly where things are for GUI explorer-type applications. For example, on the Mac or Windows, something needs to associate .jpg files with a program, and you must know exactly where that program is. Whereas, if it's on a PATH, all you need to know is the name. With symbolic links and other Unix trickery, it's easier to move around such application. But the problem with Unix trickerey is that it's too complicated to follow for most people.

  93. 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.
  94. 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...

  95. Have we forgotten about Documantation? by S810 · · Score: 1

    Don't forget that Linux and Unix are notorius for thier Documantation. Everything is documented. It would tell you what to expect and where to find it. If it is in /usr/bin then so be it, the docs would tell you exactly where it is.

    --
    "I think you know what I'm talkin' about, Mr. President; We're gonna kill us a mummy!" - Bruce Campbell as Elvis Presley
  96. 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.

  97. Yeah whatever. by Rares+Marian · · Score: 1

    What does he do? Run commands by searching through /usr/bin/ using mc?

    Having $PATH=$EVERYAPP/bin, etc. is moronic.

    Why make it harder?

    Having an anal retentive filesystem isn't going to change program quality.

    Having said that, I think filesystems could use the following concepts:

    A directory = pointers to inodes for various files
    A folder = list of files, pipes, devices, fifos, netconnections, organized together

    A folder would contain a heading subfolder that referenced the directory files that had the inode pointers for the files in the folder.

    A list = any delimiter separated sequence of objects referenced

    You home directory would become your home area defined by a list of the folders that you wished to have organized there.

    I think that sometimes people forget that there is no folder and there is no directory. There is just data. Arguing that /usr/bin has over 2000 files is like complaining the sky is too blue.

    --
    The message on the other side of this sig is false.
  98. 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 Anonymous Coward · · Score: 0

      This is considered funny?

    2. 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?

    3. Re:Why windows doesnt... by xmda · · Score: 1

      ...and if you had read my (score:1) post yesterday you have the answer to your problem: http://mathias.dahl.net/dat/doc/html/hemsida/gqsmc .html :)

    4. Re:Why windows doesnt... by Anonymous Coward · · Score: 0

      If it is consoles you crave in Windows, consider this setup:

      - Install Cygwin (www.cygwin.com)
      - Add symlinks to your fav GUI apps in, say, /usr/local/bin (=C:\cygwin\usr\local\bin)

      Now use the bash command line to start stuff. Giving a filename as a parameter usually works and some apps even have sane CLI behaviour beyond that: I know of some GUI apps which accept input from stdin, so you can even use good old pipes to send them data.

      If you're not too critical, this setup almost makes Windows look like a unix desktop with xterms!

      Hope I'm not too much off topic here...

  99. 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.

  100. 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 Jack+Auf · · Score: 1

      Hmm...I guess that should be Beehive Linux

      That'll learn me not to preview.

      --
      "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety" - BF
    2. 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.

  101. 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)

  102. 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.

  103. Is /Applications really for Mac OS X CLI ? by rpk · · Score: 1

    There are some applications like XFree86 on OS X which put CLI implementations inside the bundle, but that's a pretty odd case, and besides, it's more of a Darwin application than an OS X application (although that is changing it it becomes more integrated with Aqua).

    What I'd really like to see migrate to other Unices is the framework concept and version discipline for shared libraries. But the problem with that is maintainers of various Open Source DSOs like libz, libtiff, libpng, and so on would have to start tracking binary API compatiblity vs. mere source compatibility, which isn't trivial.

    Alternatively, maybe there should be a Darwin project that collects the most popular libraries and gives them meaningful version information, so that dependent projects can take advantage of it. It would mean changing link statements in upstream projects but it is work that would avoid a needless proliferation of DSO versions, and could be eventually applied to other Unices if they ever come their senses. (OK, ;->)

  104. 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.

  105. 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?
  106. at last!!! by Achilleas · · Score: 0, Redundant

    the solution is simple : use subdirectories, and provide sym-links to a main directory which is standard...

  107. 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.

  108. 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.
    4. Re:Why package management sucks by SuperQ · · Score: 1

      this seems to be a problem with you, and not the package management system.

      if you're compotent enough to build and install the library, you are certinly compotent enough to read up on the packaging system, do the simple things necessary to create a build control file, and build the package for yourself.

      I've discovered that taking a source package from a newer version of a distribution and compiling it localy can really make things easier.

      the problem is that you want the update, but you're too lazy to do it properly. if you don't bother with the package system when you do updates, you might as well not use it for anything at all.

      building packages is easy, well documented, and saves time in the long run. and it can also help other users in the community. Linux is a community effort, you have to give to get.

    5. Re:Why package management sucks by Anonymous Coward · · Score: 0

      And if you are COMPETENT enough to build a binary package, then you are certainly COMPETENT enough to read a dictionary and learn how to spell.

      Just because a person is COMPETENT enough to build and install libraries doesn't meant hat they should have to learn the packaging system to the point that they can create the packages themselves. Eliminating that is the whole reason for distributions and packages in the first place.

    6. Re:Why package management sucks by SuperQ · · Score: 1

      I was never good at spelling, sue me.

      anyway, you are missing one thing.

      if you are installing base system components, you are not a user, you are mucking around with the internals of the distribution.

      linux distributions are a starting point for building. Not an elimination of package maintence.

      you have two options, in my opinion:

      #1: use vendor packages only, if you want updates, goto them, pay them, download from them.

      #2: build extra system components within the rules of the distribution. hacking and bypassing the distribution outside of the package rules is bad practice. and that's what this whole thread started out as.. what is "best practices" for software installation.

  109. 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!
  110. 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.

    2. Re:installshield isn't a package *manager* by Anonymous Coward · · Score: 0
      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

      Easy. Go to the program's install directory and type dir /S >list.txt. If it isn't in the directory, it doesn't belong to the package.

      query a specific file to find out what package it belongs to

      See above. Just look at what directory it's in.

      list what other packages a package depends on

      I assume you are talking about executables or DLLs, in which case Microsoft has had a program available for a long time called Dependancy Walker.

      list all other packages that depend on a given package

      You've got me there. I can't see why you would want to do this though.

      I am not nitpicking here. These are legitimate gripes.

      Not really. They are only legitimate gripes if you come from a Linux background where you are used to an all-in-one package management system. Between the system registry and a logical file system layout, Windows doesn't need such a program.

    3. Re:installshield isn't a package *manager* by J.+Random+Software · · Score: 1

      Dependency walker won't find calls to LoadLibrary (which some apps call because a plugin is declared in the registry or because the runtime linker's feedback about missing DLLs is so useless) or CoGetClassObject (which is how every COM client loads server or proxy DLLs). And I can't expect it to be there on an end user's system.

      I can't see why you would want to [list all other packages that depend on a given package] though.

      You can't ever safely remove a package without answering the question "does anything (that I'm not removing) depend on this?"

  111. fa! by Anonymous Coward · · Score: 0

    Why does your /usr/bin have 1500 files in it? It's called Redhat bloat!

  112. One way to do it. by fungai · · Score: 1, Informative

    Here's what I do on server systems (workstations I handle differently). I only install the minimum amout of packages during system install time. From that point onwards I only install under /usr/local/package_name. All my source goes into /usr/local/package_name/src. I always compile from source where possible. /opt is symlinked to /usr/local as well.


    $ cd /usr/local
    $ ls
    apache djbdns firewall info mysql redhat share
    bin doc freeswan kernel openldap rsync squid
    cvs e2fsprogs games lib openssh samba src
    cyrus etc imp man openssl saprouter wget
    dhcp exim include mathopd portfwd sbin wu-imap
    $


    I use ksh, so in /etc/profile I have:


    LOCALPATH=""
    for DIR in $( ls -d /usr/local/*/*bin )
    do
    if [[ -z $LOCALPATH ]]
    then
    LOCALPATH=$DIR
    else
    LOCALPATH=$LOCALPATH:$DIR
    fi
    done
    PATH=/root/bin:$PATH:$LOCALPATH

    MANPATH=/usr/man
    for DIR in $( ls -d /usr/local/*/man /usr/local/man/* )
    do
    MANPATH=$MANPATH:$DIR
    done


    And my PATH looks like:


    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/openssh /b in:/usr/X11R6/bin:/usr/local/apache/bin:/usr/local /apache/cgi-bin:/usr/local/cvs/bin:/usr/local/cyru s/bin:/usr/local/cyrus/sbin:/usr/local/dhcp/sbin:/ usr/local/djbdns/bin:/usr/local/e2fsprogs/INSTALL. dllbin:/usr/local/e2fsprogs/INSTALL.elfbin:/usr/lo cal/exim/bin:/usr/local/firewall/bin:/usr/local/fr eeswan/bin:/usr/local/mathopd/bin:/usr/local/mysql /bin:/usr/local/openldap/bin:/usr/local/openldap/s bin:/usr/local/openssh/bin:/usr/local/openssh/sbin :/usr/local/openssl/bin:/usr/local/rsync/bin:/usr/ local/samba/bin:/usr/local/samba/sbin:/usr/local/s aprouter/bin:/usr/local/squid/bin:/usr/local/wget/ bin


    Which may look ugly, but I never actually look at it, and it works just fine. I've never noticed a speed decrease because of the long PATH... YMMV

    1. Re:One way to do it. by Make · · Score: 1

      You should really consider trying out the program GNU stow (apt-get install stow) - it's a really cool utility that lets you manage your /use/local tree. Very easy to use, and quite powerful.

  113. Application Paths by jonathan_atkinson · · Score: 1

    I use Windows. I'm asked by the installers where I want to put my apps. It works, simple as that.

    Moderators, think about this before modding down.

    --jon

    --
    Cleanstick.org: Dumb weblog about nothing
    1. 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?

  114. 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.

  115. 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.

    1. Re:not even close by Saint+Stephen · · Score: 1

      You're thinking about the old Installshield installer. That's not true for the Windows Installer. Have a look at an .MSI in the SDK tool Orca -- it's a database. When you install, that database is merged into your system. There's lots of tools to inspect it.

  116. 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.
  117. 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
  118. What standards by ToasterTester · · Score: 1

    The great thing about open standards is there
    are so many to choose from. -- A. Tannenbaum

    There are so many "Standards" they cancel each other out. To be worthwhile you need a single standard. Then all others are deemed non-standard and you use them with that understanding.

  119. Depends if you think of it as "guilty"... by smcv · · Score: 1

    The Start menu is user interface. You need to be able to use it. (On my /usr-using Debian system, each desktop environment's Start-menu-equivalent is organised in a nice neat hierarchy.)

    OTOH, if you have a package manager and a sensible $PATH, /usr/bin doesn't *need* to be user-readable (and if you don't find the package manager useful, what are you doing choosing a packaged distro?)

    When I run, say, ping from a command line, I don't particularly care whether it's in /bin, /usr/bin, /usr/local/bin or wherever, as long as it runs and none of its required files are "owned" by two packages at once and liable to be deleted or overwritten by mistake (the Debian package installer, for one, specifically prevents you from installing two packages both claiming to own a given file).
    Windows needs C:\Program Files (which is just like /opt) because each program installs itself, and because there aren't well-defined locations for many things (there is no FHS for Windows) so some applications are programmed to look for "./MyDataFile" rather than the Unixish /usr/share/programname/mydatafile.

    The reasoning behind /usr and friends isn't based on the same assumptions as Windows; if you have many identical Unix boxes with NFS, you can give each its own /var and /tmp, share /home, possibly share /etc between boxes with the same hardware and configuration, share most of /usr (/usr/bin, /usr/lib, and so on) between boxes with the same hardware, and share /usr/share between everything (at least in theory).

    You try doing that with large chunks of C:\Windows on anything except a network of clones. (No, wait, Windows doesn't have a Unix VFS, so you can't attach things to arbitrary points on the filesystem, you have to use drive letters... and you don't even get symlinks to make up for it...) Yes, this is redundant on a home PC; but so are many things. Many of Windows' various NetBIOS and related networking features are redundant on anything except a corporate network, but they're still there.

    /usr/local is very useful on a package-managed system - it marks out part of the filesystem which the package management is not to mess with. Anything I do there won't get overwritten next time I upgrade a package, and vice versa. I wish Windows had something similar (oh, wait, Win98 has the Web View "no user-servicable parts inside" pages pasted across precisely the folders you often need to mess with to make things work). The only Linux systems I can think of where /usr/local is useless are (1) ones with broken packages which install into /usr/local anyway (yech), and (2) Linux From Scratch :-) (which is what you use if you're allergic to package managers).

    As for /home/myname, it's just a multi-user version of C:\My Documents (you do use that or your own equivalent instead of saving Word documents in C:\Winword or whatever, right?), with the added advantage that it's far quicker to type (although you rarely need to type it anyway thanks to the shell's ~ shortcut) and doesn't have that command-line-tool-breaking space in it... When set up for multiple users, Windows uses C:\Windows\Profiles\myname, which is rather worse than /home/myname, and when set up for one user, it puts a lot of what would be "dotfiles" on Unix straight in the Windows folder (user.dat for example), making just-the-important-stuff backups difficult. Using a subdirectory /home is a nice compromise between cluttering the root directory (/myname) and obscurity (the closest equivalent of Windows profiles directories would probably be /usr/profiles/myname?)

    1. Re:Depends if you think of it as "guilty"... by nosferatu-man · · Score: 1

      "No, wait, Windows doesn't have a Unix VFS, so you can't attach things to arbitrary points on the filesystem, you have to use drive letters... and you don't even get symlinks to make up for it..."

      Wrong on both counts.

      (jfb)

      --
      To spur "enterprise Linux," Big Bang, the distributed two-phase commit.
  120. Not a problem with the File System Standard by Dr.+Blue · · Score: 1

    I think the point that's missed here is that this is not a problem with the FSS, but with how RedHat (and some others) have interpretted it. /usr/bin is for standard binaries -- but what is "standard"?

    Personally, I don't think anything with a GUI is a "standard Unix utility", and has no business being in /usr/bin. I started using KDE before RedHat started packaging it, and compiled it myself where it should have been -- /opt/kde. That keeps everything nice and compartmentalized. I just about choked when I started using RPMs and saw that RedHat had put everything in /usr/bin. Add gnome in there as well, and you've just got a completely stupid situation.

    Unfortunately, I'm faced with the same problem many other people are: use a package manager, or have a decent filesystem layout. I chose the package manager, because I have so much stuff on my system these days that dependency checking is extremely valuable. And with that in mind, I use RPMs for everything, and don't really compile anything myself any more (well... mostly). Yes, I could (and did at one time) get the SRPMS and change the spec file to put things where they should be, but honestly I just don't want to take the time to muck with that any more. So I'll just hold my nose and try not to look too much at where the files are kept....

    1. Re:Not a problem with the File System Standard by jeffc128ca · · Score: 1

      "Unfortunately, I'm faced with the same problem many other people are: use a package manager, or have a decent filesystem layout"

      Do the folks a Redhat know about this issue. It could be one of those "We habe always done it this way and now one told us it was bad" kind of things. It seems to me if it made sense and someone mentioned it to them they would modify there package.

  121. Mosfet is right on this one by mrcparker · · Score: 1

    I have disagreed with some of what Mosfet has said in the past, but I fell he is right on target with this critisism.

    Yea, making a long, complicated path name is ridiculous and adds more complication - but the fact is that something should be done to clean up the mess that is the Linux file system.

    Even 600 binary applications in one directory is stupid and overcomplicated, and setting up a system where in order to manage these binaries requires a package manager is a broken way of thinking.

    I am sure that, with all of the minds connected to Free software we could come up something that is better and more manageable.

  122. It's only have the solution by winterstorm · · Score: 1

    Even with your solution, which is valid IMHO, you still need a package manager to check dependencies, perform auditing, and make installation and upgrades simpler. The RPM package manager allows your to choose the root that the files will be installed under. So your solution could be used in conjuction with so-called relocatable RPM packages. You could choose to install RPMs under /opt instead of /. In fact many of us choose not to go with the Solaris /opt naming and just use /usr/local (not that it makes a difference).

    Someone else also commented that many sysadmins don't put every software package in its own directory, and choose to separate run-time data, and configuration files from the directory of the package. Your statements are fantastic but I think you've gone overboard that saying that all sysadmins adhere to your standard, and thus implied that anyone who doesn't isn't a sysadmin. ;-) There isn't "one right way" for installing software; that's why GNU configure has so many options. :-)

  123. don't miss the point by Anonymous Coward · · Score: 0
    What hasn't been stated very well is this:
    Some distributions put packages and some packages want to put themselves into system areas such as /usr/bin, /lib, etc. when they should not be there.


    Take some servers for example, samba, apache, bind, dhcp, etc.
    There is no need for them to be scattered into system areas. There is no need for them to be in directories which would be in anyone's path.


    Services like that should be in their own directories because their execution should be done via absolute paths and only by way of a few very specific startup scripts.

  124. Mac OS X by ruzel · · Score: 1

    Not to say I told you so, but Mac OS X abides by this. phhhhhhbt!

  125. 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
  126. People have forgotten directory search costs by Harik · · Score: 1
    One thing I notice not mentioned here is that with a decent filesystem (even ext2 with recent non-standard patches) a single massive directory is much faster then 2 or 3 (or 20 or 30) smaller directories when you want to execute something.

    There were e2 problems with large numbers of files in a directory (ask any tradspool USENET administrator) but somehow I don't think that applies to only a few thousand.

    That said, I would prefer symlinks in /usr/bin to actual programs. Debian is 'close' to that, in it has an 'alternatives' system... I.E. vi points to elvis, vim, nvi, ae, etc, depending on what you have installed. Misses the point in that all 'alternative' binaries are in /usr/bin.

    However, if one cared, it's not too hard to fix debian, since it's moving to a more hierarchial structure: /etc/samba/* rather then /etc/smb.conf, etc.

    so, with a quick script, you can take the output of dpkg -L and move all the custom directories to /opt/packagname-version/*, and all the bins to /opt/bla-1.0/bin

    /bin should, of course, contain real files. Things in there are required to boot. Symlinking to a seperate filesystem != good.

    --Dan

  127. stow by nowan · · Score: 1

    You may want to check out stow. It's not exactly what you're talking about, but does allow you to have the traditional etc, bin, lib, etc., and a mutt directory with everything mutt-related at the same time.

  128. actually no by Anonymous Coward · · Score: 0

    I keep clear of /opt because it too is ingrained in some package setups. The place for all this is /usr/local

  129. Agreed by athlon02 · · Score: 1

    You can overdo it on directory entries as much as you can with files themselves. Now 2000 files is a lot in one directory, but I guess it really depends on your preferences/paranoia/whatever as to how many/few directories you want & the number of files in each.

  130. The Alternative = SOFT LINKS by Anonymous Coward · · Score: 0

    I think a reasonable compromise would be to have the programs installed in their own directories and then softlink the binaries and libraries to the standard locations. That way, you don't muck with extremely long paths and you can tell what programs belong to which packages. It's a simple matter to resolve links if it becomes necessary to move the program directory or delete it.

    1. Re:The Alternative = SOFT LINKS by Petrus · · Score: 1

      You mean symbolic link?

      If so it is almost right. Only that because following the symbolic link is much slower than following hard link (directly to the same i-node), it is much bettre to install the code actually in the /bin or /usr/bin or /usr/x11/bin and make to it symbolic link in it's own directory.

      Many applications make it that way, if I recall most in /usr/local/bin, WordPerfect, Applix, FrameMaker and others.

      There are few, though, which make it the way you described. For instance, the X-windows itself, the X11 command was a link in the 3.x.x systems to the appropriate driver and version 4.x only changed the system slightly.

      Now if you move the program directory, no problem if you used asolute paht. But you should not delete the program directory wihout looking first where all the links point to. And then you need to find out, if another application needs that executable, before you can delete it.

      Petrus

  131. 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.

  132. WRONG by Anonymous Coward · · Score: 0
    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.

    Maybe you should actually start paying attention when Dcrappage tries to remove/purge a program. It almost always leaves junk in /etc and occasionaly in subdirectories under /usr. Usually there is a man page or two left lying around as well.

    1. 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?

  133. 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
  134. /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
  135. Lend a hand? by chuckw · · Score: 1

    So ah Mosfet, how much work have you done with the FHS group? Or do you just prefer to rant...

    --
    *Condense fact from the vapor of nuance*
  136. Taco, don't keep your pr0n in /usr/bin... by SethJohnson · · Score: 0, Flamebait


    Why does my /usr/bin need 1500 files in it?

    Taco,

    I don't know what software you are using to download binaries off usenet, but it sounds like there's a configuration glitch. If it's storing the pictures of cocker spaniels in /usr/bin, that's probably because of where the program is installed. Try changing the default setting to something like /usr/home/cmdrTaco/urineFetishPics.
    1. Re:Taco, don't keep your pr0n in /usr/bin... by SinisterAngel · · Score: 0

      Your trolling abilities are to be praised! Here is a cookie, now go play in traffic.

      --


      This post close captioned for the thinking impared.
  137. Rox thing by Anonymous Coward · · Score: 0
    Says "The ROX Desktop is an easy to use (and understand!) graphical desktop"


    We're talking command line use...

  138. BITCH BITCH BITCH by kindbud · · Score: 1, Flamebait

    Mosfet sez, at the end of his article:
    Second of all a few angry people questioned my qualifications to make the above commentary, and one person even called me a novice!

    Perhaps this is because he made a novice-level comment:
    I asked around and it seems they don't want to manage the user's PATH variable, which tells Linux where it's programs are.

    I don't think I need to point out the glaring newbie goof here. Well, maybe I do: the shell makes use of PATH, not Linux, not Solaris, not Windows. PATH has nothing at all to do with Linux.

    I am not a Linux fan-boy, so I have no idea who Mosfet is, aside from this article where he sounds like a novice ranting about nothing important. Yeah, RH is bloated. Who'd have guessed?

    --
    Edith Keeler Must Die
  139. 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.

  140. Fermilab's UPS/UPD by TopherC · · Score: 1
    Here's an example of what happens when you try to put 2000 entries in your $PATH:

    Fermilab's computing division made an interesting effort to solve the problem of a cluttered /usr/bin directory. Their primary objective, I think, was to allow for users to choose between multiple versions of various programs. The result was UPS/UPD. I think this system was based on a kind of "setup" utility from VMS, but I'm not sure of the details. You "setup" a product, optionaly giving a version number. This is sometimes important when a newer version of a product is not entirely backward-compatable. One good example is the early versions of the Tcl/Tk interpreters.

    I don't think this is an ideal solution by any means. You can quickly end up with an extremely long $PATH, and exceed the built-in limitations. Besides, putting all this in your $PATH is a shell-dependant approach, which has many disadvantages. You also have to setup every program you are using, whether you know you are using it or not. There are problems with dependencies, and all sorts of other stuff.

    Even so, I have not seen any other solution in Unix to the problem of maintaining multiple versions of a product.

  141. 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.

  142. 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
    2. Re:Minor revamp, no need to scream by r7 · · Score: 0

      Years ago /usr was considered read-only, due to hard drives that maxed out at 200MB, but that certainly isn't the case today.

      In comparison with other Unix distributions Linux certainly does come out behind with regards to filesystem organization. Take Apache for example, configuration under /etc/httpd, binary under /usr/sbin, libraries under /usr/whatever, gawd what a mess.

      The right way to do apache is to put everything under /usr/local/apache (on a standalone system) or /usr/apache (when using a networked /usr/local) /{etc,bin,lib,...}.

      Filesystem organization, quality assurance, networked filesystems, ... all areas where Linux immaturity shows badly relative to other Unix OS. On the positive side addressing these weakeness would boost Linux popularity 10-fold (IMHO)

  143. Because of mounting filesystems. by Petrus · · Score: 1

    Why not install everything into root?

    There are reasons for all this madness. Let's list them just for the record:

    Because you may want to have /sbin and /bin local and everything else network mounted. If network breaks, how will you fix it, if all / were on network?
    Or, you might want to have /tmp and /var on fast RAID0, while /home on redundant RAID5 array.
    Or, because you might want to have /boot, /sbin and /usr/sbin, especially login code on read-only volume for better security.
    Or, on machine used as dmb terminal you might not want to have the big and bulky /usr/X11/*.
    Or, because you might want to have 2 versions of /lib mounted alternativelly.

    The reason for no tree under /usr/bin and /usr/X11/bin is speed. The $PATH search becomes shorter and the usually cashed directory directs you straight to the proper inode. That's why Linux and Unices are far faster than Windows.

    Actually there are quite a package specific trees under /usr/share. In non-RPM system, these would be normally in /usr/local. Making a link from /usr/bin to the package directory for the binary is slow, but it can be done the ther way round. Why it is not done, I can't tell you, but it seems that the few good and big packages do it.

    However, there are reasons for criticism:
    Mandrake, for instance, adopted HFS in 8.0. All /usr/doc and /usr/man was moved into /usr/share. But not exactly all (not ViaVoice) and not the old packages from before upgrade. Tell me why they did not move the old stuff over first and why did not make the symbolic link /usr/man -> /usr/share/man, so that any of the thousands users who have old $MANPATH can at least see a manual for 'man' ?

  144. NG (Next Generation) Unix Directory Structure by Anonymous Coward · · Score: 0

    NG (Next Generation) Unix Directory Structure Standard
    First Draft

    / -- no files here, one thing unix did right

    /Config -- /etc
    /Config/Boot -- /boot

    /Devices -- /dev
    /Devices/Processor -- /proc, maybe /System would be better

    /System -- /usr, contains no files
    /System/Executables -- /usr/bin, be in path
    /System/Executables/Admin -- /usr/sbin & /sbin, be in path for admins
    /System/Libraries -- /lib & /usr/lib
    /System/Manual -- /usr/man, /usr/doc, etc.

    /Programs -- /opt & /usr/local, contains no files
    /Programs/Executables -- symlinks only, be in path
    /Programs/Manual -- symlinks only to docs. either man pages or entire directories
    /Programs/ProgramName -- program executables should reside here (at least primary ones)
    /Programs/ProgramName/Config
    /Programs/ProgramName/Whatever -- remaining directories should be app specific

    /Home -- contains no files, maybe it should be /Users
    /Home/UserName -- contains files
    /Home/UserName/Programs -- user installed programs
    /Home/UserName/Programs/Executables -- should be in users path, symlinks only
    /Home/UserName/Desktop
    /Home/UserName/Mail
    /Home/UserName/Documents
    /Home/UserName/Web

    /Temp -- /tmp

    /Drives -- /mnt, maybe something else?

    Unix Directory Structure - Probably been around since 1970. Really defines unix more than anything.
    Gonna have to be redone some time - Or else we will always look archaic next to windows, etc.
    Everything WILL be broken - Might as well make it look good and redo it all.
    Case Insensitive File Names - Do they really add anything?
    Include files = Evil. - Shouldn't have include directories.
    Libraries - Not sure what to do with those directories, as far as program libraries. Should there be a /Programs/Libraries
    I'm thinking that X, Perl, Emacs, Vi, etc. would go under /Programs. Only the standard system utils should go under /Programs/Executables
    I don't like seperate partitions for some of the root directories. More trouble than it's worth.

    Fully open to suggestions. Is anyone interested in starting work with me on a distro project that would use such a file system?

    Bryan
    bryan@cooltext.com

  145. 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.
  146. Path? by entrigant · · Score: 1

    Maybe I'm just being a little too simplistic here.. but why exactly does EVERY program need to be in the path? Of course I'm not exactly a command line person... it's a lot easier to be lazy with a mouse and a big pretty menu, but nonetheless when I do use a command line I'd much rather have sensible organization rather than a little less to type.

  147. Or is it irrelevant? by OrangeTide · · Score: 1

    Or is it irrelevant?

    ... most things on /. are.

    --
    “Common sense is not so common.” — Voltaire
  148. 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
  149. 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.

    2. Re:But what about libraries? by Anonymous Coward · · Score: 0

      AFAIK ldconf does follow symlinks, at least
      it has done so for me for the last 4 years. I've
      been running ldconfig 1.9.5 and upwards

  150. What about something like devfs ? by Kresh · · Score: 0

    Just an idea:
    somebody could hack devfs to not only create a dynamic /dev but also /usr/bin, /usr/man etc.,
    or even /rootfs.

    Does anyone know wheter QNX's package file system has an open standard?

    ---

  151. NG (Next Generation) Directory Structure - Repost by alphora · · Score: 0, Redundant

    NG (Next Generation) Unix Directory Structure Standard First Draft / -- no files here, one thing unix did right /Config -- /etc /Config/Boot -- /boot /Devices -- /dev /Devices/Processor -- /proc, maybe /System would be better /System -- /usr, contains no files /System/Executables -- /usr/bin, be in path /System/Executables/Admin -- /usr/sbin & /sbin, be in path for admins /System/Libraries -- /lib & /usr/lib /System/Manual -- /usr/man, /usr/doc, etc. /Programs -- /opt & /usr/local, contains no files /Programs/Executables -- symlinks only, be in path /Programs/Manual -- symlinks only to docs. either man pages or entire directories /Programs/ProgramName -- program executables should reside here (at least primary ones) /Programs/ProgramName/Config /Programs/ProgramName/Whatever -- remaining directories should be app specific /Home -- contains no files, maybe it should be /Users /Home/UserName -- contains files /Home/UserName/Programs -- user installed programs /Home/UserName/Programs/Executables -- should be in users path, symlinks only /Home/UserName/Desktop /Home/UserName/Mail /Home/UserName/Documents /Home/UserName/Web /Temp -- /tmp /Drives -- /mnt, maybe something else? Unix Directory Structure - Probably been around since 1970. Really defines unix more than anything. Gonna have to be redone some time - Or else we will always look archaic next to windows, etc. Everything WILL be broken - Might as well make it look good and redo it all. Case Insensitive File Names - Do they really add anything? Include files = Evil. - Shouldn't have include directories. Libraries - Not sure what to do with those directories, as far as program libraries. Should there be a /Programs/Libraries I'm thinking that X, Perl, Emacs, Vi, etc. would go under /Programs. Only the standard system utils should go under /Programs/Executables I don't like seperate partitions for some of the root directories. More trouble than it's worth. Fully open to suggestions. Is anyone interested in starting work with me on a distro project that would use such a file system? Bryan bryan@cooltext.com

  152. Right On Brother!!!! by Capt.+Beyond · · Score: 1
    It's about time SOMEONE stands up and rants about this behavior!

    This is the entire reason why I refuse to install anyone's KDE, or GNOME, or even QT rpm package- even on a new install. I've even taken up the habit of compiling other large packages, such as libc, because I don't want that crap thrown into /usr. Put it where the developers default is!

    As a developer I demand that if you distribute any copyrighted material of mine, to put it where I, or more importantly, where the user wants.

    Mosfet is entirely correct here. RPM's have caused me much more pain than any 'dll hell' on windows ever did!

    --
    -- "Perceptions create reality. By changing your perceptions you change your reality."
  153. NG (Next Generation) Directory Structure -NonHTML by alphora · · Score: 1

    NG (Next Generation) Unix Directory Structure Standard
    First Draft

    / -- no files here, one thing unix did right

    /Config -- /etc
    /Config/Boot -- /boot

    /Devices -- /dev
    /Devices/Processor -- /proc, maybe /System would be better

    /System -- /usr, contains no files
    /System/Executables -- /usr/bin, be in path
    /System/Executables/Admin -- /usr/sbin & /sbin, be in path for admins
    /System/Libraries -- /lib & /usr/lib
    /System/Manual -- /usr/man, /usr/doc, etc.

    /Programs -- /opt & /usr/local, contains no files
    /Programs/Executables -- symlinks only, be in path
    /Programs/Manual -- symlinks only to docs. either man pages or entire directories
    /Programs/ProgramName -- program executables should reside here (at least primary ones)
    /Programs/ProgramName/Config
    /Programs/ProgramName/Whatever -- remaining directories should be app specific

    /Home -- contains no files, maybe it should be /Users
    /Home/UserName -- contains files
    /Home/UserName/Programs -- user installed programs
    /Home/UserName/Programs/Executables -- should be in users path, symlinks only
    /Home/UserName/Desktop
    /Home/UserName/Mail
    /Home/UserName/Documents
    /Home/UserName/Web

    /Temp -- /tmp

    /Drives -- /mnt, maybe something else?

    Unix Directory Structure - Probably been around since 1970. Really defines unix more than anything.
    Gonna have to be redone some time - Or else we will always look archaic next to windows, etc.
    Everything WILL be broken - Might as well make it look good and redo it all.
    Case Insensitive File Names - Do they really add anything?
    Include files = Evil. - Shouldn't have include directories.
    Libraries - Not sure what to do with those directories, as far as program libraries. Should there be a /Programs/Libraries
    I'm thinking that X, Perl, Emacs, Vi, etc. would go under /Programs. Only the standard system utils should go under /Programs/Executables
    I don't like seperate partitions for some of the root directories. More trouble than it's worth.

    Fully open to suggestions. Is anyone interested in starting work with me on a distro project that would use such a file system?

    Bryan
    bryan@cooltext.com

  154. Moderators, this is the opposite of INSIGHTFUL! by Medievalist · · Score: 1, Flamebait

    Unfortunately I don't have any mod points today.

    To be INSIGHTFUL mean sharing a non-obvious INSIGHT.

    The prior post, ironically, dumbs down the whole point of the original rant to the point of ignoring any and all deeper issues such as the desirability of elegant structure, the foolishness of relying on a single tool when this is unnecessary, and many others no doubt raised below.

    C'mon, moderators, get a grip! Interesting, maybe, flamebait, maybe, but INSIGHTFUL? Geez.

    --Charlie

    1. Re:Moderators, this is the opposite of INSIGHTFUL! by Anonymous Coward · · Score: 0

      Look at the time of the post, it's 8 minutes after the posting of the story. That's why the user got modded so highly.

      Any half ass comment stating something obvious posted within 10 minutes of the story being posted gets instantly modded up

      LOOK I HAVE MOD POINTS, I MUST USE THEM ***NOW***!!!!!!! OR I'LL LOSE THEM.

      I understand the logic being making mod points expire, but it the result is something even worse. People feel the need to use them even if there's no really deserving comment.

    2. Re:Moderators, this is the opposite of INSIGHTFUL! by Medievalist · · Score: 1

      Good point. Thank the gods for meta-moderation.
      --Charlie

  155. $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.

  156. Telnet is not your friend by Medievalist · · Score: 1

    ...except for debugging port services like SMTP, NNTP, etc.

    SSH is your friend.

    Sorry, couldn't resist. Your point in re: symlinks is of course excellent. I will mod myself down now.

    --Charlie

    1. Re:Telnet is not your friend by Meleneth · · Score: 1

      you caught me, it's a subtle ploy to see who bites ;)

      besides, some people out there still don't know. Not so much around here of course, but there's always the chance that someone reading this doesn't know telnet is insecure.

      great for checking out those port services or finding out what's running where tho...

      --
      remote access CLI with tools is the only friend you'll ever need.
  157. 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

  158. Re:The Alternative [How about /usr/share ??] by Anonymous Coward · · Score: 1, Interesting
    I absolutely agree that this is the best way to do it, and I generally try to do it the same way myself.

    However the files which default go into the /usr/share... directory give me problems, because the share hierarchy that comes with the application usually has its own appname/version subdirectories and linking from /usr/local/{bin|man|lib|include..} gets clumsy (I think at least) comments?

    - what it is the share hierarchy for anyway?

  159. 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)
  160. 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
  161. 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

  162. 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.

    2. Re:And how about... by empath · · Score: 1

      You sure could have a system like this.. It's called MacOS X.. But I guess nobody here has taken a look at that filesystem layout..

      --
      "Please don't sigh like that, maam"
  163. 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
    1. Re:dpkg + Local compile integration mini-HOWTO by monksp · · Score: 1

      Back when I was using Debian, I figured this was the oute that I'd have to take, but didn't know enough about dpkg to pull it off, and didn't do enough with the box that required 'bleeding edge' libraries, so never got around to reading up on it.

      Seems like some major effort, though. When it comes to package managers, though, I'd love to see an interface that allows you to specify options as already installed during package-add. Something akin to:

      Package Foo.deb requires Bar, install Bar (y/n/a),
      where A is is 'Already installed', and then specify the path to the lib, and have the package database make a note of it. This would get more than a little wonky, though, when you start needing library packages that include multiple shared objects. There are probably other places where it would get use as bad to work with, but since I'm using BSDs ports these days, haven't given it much thought as of late.

      --
      -- My work here is done. If you need me again, just admit to yourself that you're screwed, and die.
  164. wHat about symlinks by Pr0xY · · Score: 1

    I think a nice solution is to keep all the files in seperate directories, but then use symlinks to put the executables in the appropriate /bin dirs.

    personally i prefer having lots of seperate directories for seperate apps and using the PATH variable. with the source setup of QT/KDE, i can uninstall all KDE programs with 1 command:

    rm -rf $KDEDIR

    and likewise with QT. It wouldn't be hard to set things up cleaner, nicer. But if the distro/package managers want to be stubborn, i'll settle for symlinks.

  165. Encap and Stow by Technik~ · · Score: 1
    I've read a couple of comments referring to /opt and symlinks but no one has yet (yes, I searched) mentioned my favorite solutions:
    Both manage the symlinks for you and, for those who don't build their own, it is trivially easy to convert existing packages or tarballs to their system.
    - technik
  166. 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.

  167. 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.
  168. 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
  169. 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.

    2. Re:Specialize! by I.+M.+Bur · · Score: 1

      Even those Windows have a "Home", "Professional", "Server" and whtever packages... Hey you guys at RedHat, why not make a "Home" distro, using this guideline, "Professional" distro (thats what we get now, I think) and a "Server" distro, which may even have something like "compile alternate kernel" option in the install process (for things like multi-processor support etc.)?

  170. 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...
  171. one way to do it by jrstewart · · Score: 1

    IMO, the right thing to do is to have /opt (or /usr/site) contain a directory for each package, with normal /usr/local-ish directories under each package. I.e. you'd have /opt/gnome/bin, /opt/gnome/man, etc... Then symlink everything you want from /opt/*/bin, etc. into /usr/local/bin, etc.

    This lets you keep multiple versions of packages online, have simple paths for users, and even (if you're clever) keep things architecture independent. (i.e. you could have /opt/gnome/bin-i386, /opt/gnome/bin-ppc, but still share /opt/gnome/man). If you're administering a bunch of workstations, this setup + NFS is probably the only way to fly. You can nfs mount /opt as well as /usr/local this way.

    It's possible to get GNU configure to build into this kind of setup with appropriate commandline switches.

  172. Why /opt? by Anonymous Coward · · Score: 0

    I agree that there is too much crap in /usr/bin but why /opt for applications? My first encounter with /opt was on SunOS and Solaris workstations and I really hated it. Is /opt a Sun thing? If so why would we want it on GNU/Linux. I don't know why I hated it. I don't know if its the three letter combination of o p t or what, but /opt really makes my ass itch! I prefer /usr/local much more. It just sounds nicer. If /usr/local isn't appropriate can't we atleast come up with something better than /opt?

    Maybe /usr/pkg or /usr/distro or /usr/app?

  173. Why not follow something already familiar? by Anonymous Coward · · Score: 0

    Has anyone ever thought of setting system wide stuff similar to /etc/ld.so.conf???

    Instead have a /etc/bin.conf and list all the directories in there.

    Seems simple for apps in many directories instead of having to change 3 files to edit system wide path.

  174. 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?

  175. Re:I think it is better to create $HOME/bin by Anonymous Coward · · Score: 0

    In my company we have lots of different packages (and libraries), many having several versions. These are all installed concurrently in their own directories, like /opt/gcc/2.95.2, /opt/gcc/2.95.3 etc. We have an inhouse tool that the user can use to manage symbolic links from $HOME/bin and $HOME/lib to the executables. This allows each user to select a specific version of a tool very easily.
    This works very well at our sites, some with thousands of users.

  176. 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?

  177. hiya faulty! by Anonymous Coward · · Score: 0

    Don't you wish k5 was back up and running so we didn't have to troll /. for kicks?

  178. Re:Let me get this straight... by Anonymous Coward · · Score: 0

    what the fuck are you doing reading slashdot?

  179. 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
  180. 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.
  181. 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.

  182. At least put the backend programs in subdirectorie by Marrow · · Score: 1


    There are programs in /usr/bin that should never
    be called by a person. They are backend routines
    that are called by some other program in /usr/bin or elsewhere.

    So put things in /usr/bin that should be called
    and are safe to call by a user from the command
    line. Put the backend programs that are not
    user-interface programs ( slave programs for
    other programs ) into /usr/lib somewhere.

    Look how many programs in /usr/bin have no
    man page!

    The KDE backround apps and screen savers are
    an easy example and there are plenty of others.

    examples:

  183. Yes, he is offbase by Erris · · Score: 1
    and these applications are the bane of MSCE's everywhere.

    Yeah, yeah, yeah, only an MSCE would whine like that, praise M$ by compairison, and not do anything to fix the problem. Does he really prefer the hundreds of undocumented closed source DLLs typically found on M$ platforms? Pttt-th-th-th-pt!

    This user has no problem managing the files and links in /usr/bin for his Debian computers. "You have to use a package manager!" he screams. Give me a break.

    --
    DMCA, Hollings, Palladium. What might have sounded like paranoia is now common sense.
  184. Re:Let me get this straight... by Anonymous Coward · · Score: 0

    Wey-hey-hey! "Let me get this straight" is back, with a vengance. We can look forward to this as an important develpoment on the Slashdot scene. After all, trolls are an integral part of this grand community, and loved by everyone. Trolling is much-misunderstodd - indeed, pissing people off on a large scale is a very social activity, done by people with lots of friends and useful things to do. Celebrate the troll!

  185. unix file system layout and contents by qbalus · · Score: 1

    It's the MIMIC factor!!! This has been going on for decades!!!

    Problem: Unix System Architects are Architects of Technology. Architects of Product do not exist in the Unix System Houses (i.e Sun, HP, Dec, AT&T, etc...)

    Product in these large Unix houses come together thru the involvement of many people in many different parts of the companies. Anyone wishing to understand the entire process would be hard pressed to do so.... because of the breadth of people and organizations involved, and limited accurate documentation

    Fundamentally the layout of filesystem, contents, installation and patching is one big reactionary, mostly chaotic process that occurs late in the life cycle. I've worked as a System Administrator, Buildmeister, Release Engineer, Configuration Management Engineer, Program Manager in the Unix world starting in 1984. I worked in and with Kernel Development, Network Development, System Installation, and assorted Unix Application teams during this time frame.

    Where files will reside, how they will be installed, and patched are almost always the last things considered in the development process. The decision process is mostly MIMIC'd. The people involved are generally just trying get the thing ready for QA and Release.

    Downstream organizations that attempt to resolve product issues, face extremely difficult challenges when attempting to influence upstream development teams.

    Working in a large unix system house, one can mostly determine which group owns the technology... but try and identify who owns the product... it will be a group of committees and teams...

    Because these issues are not properly designed up front, the result is downsteam reactiveness. The end result is new efforts MIMIC the past efforts in this area, all the current Linux distributions are examples of the MIMIC factor.

    Solution: Work with your System Architects to influence change in this area.

    Regards, Kramer

  186. 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.

  187. What? by Erris · · Score: 1
    Naming problems might not be solved this way? How does your shell tell the difference between:

    /usr/bin/1/name
    and
    /usr/bin/2/name

    Sure, the package manager will put things in the right place. But if both 1 and 2 are in your path, what happens?

    Oh well, it's a red herring anyway. These things have never bothered me yet, so I imagine there are well established ways to sort things out. You know, like the utilities that everyone wants to use just going to /bin and programs that don't call them or something in /usr/bin simply calling something in it's own directory tree, while only a link exists in /usr/bin. I might also imagine that the .deb packageing system has conflict resolution and that the package maintainers pay attention to issues like this. If it were not true my Debian would act like M$ junk.

    And then you get into naming conflicts down the road.. MS has this problem now

    We are not going where they did.

    --
    DMCA, Hollings, Palladium. What might have sounded like paranoia is now common sense.
  188. Re:UNIX is a mess... Why I build LFS... Boo! by Anonymous Coward · · Score: 0

    Rant alert.

    The DOS analogy does not hold.

    Even Windows does not follow discrete directories for each application. The Windows system applications, like telnet, and the CD player and stuff that comes with the OS goes in WINDOWS\.

    Then other applications create their discrete folders, path get updated in registry, reboot yada yada.

    So when I built my Linux box From Scratch. (http://www.linuxfromscratch.org). I followed FHS, and because I TOO am lazy, I put all basic linux utilities into /usr/bin. X, went into /usr/X11R6, and all other user apps went into /usr/local/someapp if it's big, like KDE, Mozilla, Apache, Sendmail and other apps that have their own lib/ directory get their own spot. /usr/local/kde is a symlinux to /usr/local/kde2.2.1, and if I upgrade to 3.0 later, I have an upgrade path that's incremental rather than sledgehammer.

    Small apps like lsof, nmap and stuff like that, I consider modern extensions to the basic system; they go in /usr/local/bin.

    So I always know where my apps are. If I want to upgrade linux; install from updated source my basic tools, or I can upgrade individual apps as they come out. Now that I think about, I'm going to put FHS stuff in a top dir called LINUX, and the rest in their own directory. Oh, but how will it boot? Never mind.

    In sum, with a little thought as to how one operates one's OS over years (if you have that kind of experience), then one can devise a layout scheme that works.

    Aside from that, my flameware contribution of the day, is that Linux needs to care not what works in Windows; because Windows is the mail order catalog OS, and worry about Apple's design innovations. Whatever Apple is doing is way better than anything either Linux or Windows is doing.

    The only thing Linux has going for it is foremost 1) anarchy, it's what you want it to be;

    2) Enlightenment 0.17, if we want to get behind something innovative that's it, hordes of people should be building plugin architecture for that with voice interface or 3dworlds; or some other "oo, ah" factors. Trust me, transparency is not 'oo, ah' and who gives a rat's ass if works in KDE. KDE and GNOME are both rip off interfaces that bore the shit out me, and make wish I had the $$$ for a PowerBook. I can hear you now "It won't run on my 486." Fuck you and your 486, arguments like that will keep Linux in 1990. If you like coding png bullshit into KDE, save your tendons, and do something better. KDE is outdated, I don't care if you add KOnCD, and bla bla bla Icon set. It's boring and world does not care.

    3) GNUstep, if you are gonna back a rip-off; choose to rip-off something good. Furthermore, if you're gonna rip-off, rip-off 1) without being obvious, 2) try to make it better. Have you seen the screenshots to GNUstep? The widgets look like Athena from the 80's. You gotta do better than that.

    Seriously, the mentality of "It's gotta be NOT Windows" really sucks. It begs the question; "what's it gotta be." If the answer is, "ummm... hybrid of everything in existence (KDE, GNOME); then we lose big. Critics allege well that open groups can't design interfaces. And they may be right, because the Enlightenment team is pretty small compared to KDE or GNOME. Those guys have a design reference. Shit as soon as MacOS X had zoom icons, so did KDE. That bites.

    Open Source developers should leave the KDE and GNOME work to Red Hat and other commercial vendors. The little guys have no stake in whether Linux beats Windows at being Windows-like. That's their installed-base issue to overcome. Ours is "cool factor". And being an anarchy is not cool, if the mob comes up with suede loafers, used Levi's jackets as the new "cool."

    I know I speak for many gui afficionados. "Unless Linux comes up with something better, soon, I'll be a Mac convert in a year." Come on... compete!

    -Nate

  189. 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?

  190. Urr... It's a mess... by benad · · Score: 1
    Apple uses it's own kind of "package management", which is simply remembering what was installed. No dependencies checks, no uninstall scipts, nothing. Barely enough information to use their software update thingy, and that's it.

    But that's OK, since Mac OS X's apps are almost always self-contained, making installation a simple drag and drop from a disk image. (Apps in Mac OS X are actualy directories full of stuff that, with a bit in the file system, will behave like a single file.) Only some "weird" apps and Apple's own stuff use the standard installer of Mac OS X.

    But for the UNIX stuff, Fink does a great job, with the help of the Debian package manager (you know, "dselect"). Installing a rootless XWindows and Gnome is almost too easy.

    - Benad

  191. Problems with directory per application by rusty · · Score: 1

    As one of the current FHS editors, I guess I'd better make some response.

    1) Replacing a handful of /bin directories with a massive path doesn't help, since the binary names can't clash anyway. And I have 1211 entries in /bin, but I have 561 packages installed (Debian unstable).

    2) The GNU project has been pushing for a libexec/ dir for years: this would be where non-PATH binaries live (ie. obscure things only invoked by full path name, usually by other programs).

    3) Al Viro once suggested altering shell semantics so that a filename with a / in it would still search the path, effectively giving another namespace, eg "gnome/hello --version" would not just search in "./gnome/" as it does now. For those with a passion about these things, this might be an interesting avenue to try.

    Note: the FHS http://www.pathname.com/fhs is entering 2.3 discussions, and I imagine that libexec will be proposed again. This is your chance to make your voice heard (but read the latest draft first, especially the Purpose section).

    Finally: remember that ALL standards stifle innovation, and that something radically different won't be compliant. That's FINE: there are no FHS police 8)

    Cheers!
    Rusty.

    1. 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.

  192. woohoo Rox .... by Anonymous+Koward · · Score: 1

    thanks for pointing that out...Rox is fast and friendly. Even works well on OpenBSD, seems as if everything else is so linux-centric these days :(

  193. Freshmeat discussed this a while ago by mal0rd · · Score: 1
    A few months ago exactly the same thing was discussed in one of freshmeat's articles, for all interested.

    I just wanted to give my personal view of the situation. Hierarchal filesystems like the Linux distros use are great. Flat file systems are great. Filesystems like windows uses (one directory=one program) are great. All at their respective times.

    Personally, I don't see why everybody is is hyped up over how to organize a static filesystem. It is clear that, even theoricially, no way is perfect. The solution is simple, put every file in a database with an arbitray amount of tags. These tags can be of mime types, the package it belonged to, the version, a user specified catagory etc, etc...

    This dynamic files can be arranged at any time in any structure the user wants. It could happen dynamically and transparentally.

    please, all this bickering over an archaic idea could be put to good use arguing over what database to use for the the filesystem.

  194. Sounds like MPKG by oddityfds · · Score: 1
    MPKG (old release here) is a ports tree that installs all applications in separate directories. That also means that you can have several versions of the same program installed concurrently. It generates config files for the modules package which will manage the PATH and other environment variables for the user.

    It works pretty well, but still all programs that should show up in the Gnome or KDE menus etc. are still installed along with those packages. It is also often a lot of work to get programs to not install in /usr.

  195. I wrote a "package file system" once by Sitaram+Iyer · · Score: 1

    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

    A good many years back, I used userfs and Linux-1.3.47 to hack up a file system for managing packages. This was for a course project in my undergrad sophomore year, six years ago. Semantics were nice: ls /usr/bin did the usual thing, ls /usr/.emacs/bin showed emacs binaries, cd /.emacs switched you to a "view" of the filesystem restricted to emacs files, and all such nifty stuff. These ".emacs" type directories were internally generated by the kernel, and were invisible when you normally said "ls". It rocked the pants off slackware's /var/adm/packages based manager, and sometimes, I think, off rpm too, maybe.

    We learnt some valuable lessons, especially applicable to developers of MOM and similar systems:

    On the long run, it was systematic, and yet cumbersome to use. Suppose you cd /.emacs/usr/share/docs; and then you want to switch to docs of vim, and you had to go all the way down. This was fixable in theory.. and would have been worth it too..

    We only grazed the issues modification and upgrade. The idea was to cd /.emacs and tar -zxvf emacs-upgrade.tar.gz. Dependencies can be a bitch.

    Lastly, it (automatically) supported one nifty feature, that of cd /.emacs; tar zcvf ~/emacs.tar.gz *. This sort of thing, with added semantics like tar options to avoid .o file etc. can be marvellous for developers, compared to what's there now.

    SO I think there's potential in this direction, for stuff inconceivable from user space.

    I'd love to be contacted with ideas/suggestions/questions/whatever, or if you want me to dig up the code or documentation.

  196. Efficient solution by QuickFox · · Score: 1

    "PATH searches are more expensive than bin lookups"

    If we're discussing the principles of how things work, why not improve how PATH works?

    When the system starts, have the system go through the PATH collecting all the file names and making a quick-search table. To find an executable it would just look in this quick-search table, not in the PATH directories.

    Then the size of the PATH makes no difference at all. PATH searches will be equally quick regardless of the number of directories.

    (Implementation details: The system must rebuild the quick-search table whenever files have been added or removed in any directory in the PATH, or the PATH itself has been modified.)

    --
    Terrorists can't threaten a country's freedom and democracy. Only lawmakers and voters can do that.
  197. One file in bin per project period. by ebyrob · · Score: 1

    There are nefarious forces at work here. Lots of tools to use = good, path modifications = bad. gobs of files in bin = bad.

    I think many OSS projects have too great a footprint in the bin directory. When a big project runs it should run in it's own directory, because modularity is *very* important. You think Linux has lots of stuff now just wait 5 years!

    Of course, there's one problem with modularization how do you find the "right" version of the project? It's simple, you put a link or small bash script into bin that has the job of invoking the "big project" and doing it in the proper place. And it should only be 1 file per project. You heard me right 1 file! If you can't figure this out you shouldn't be writing big projects in the first place.

    If you don't think 1 command can do any amount of processing necessary, you haven't used emacs(shudder) lately.

    Here's an example:
    I don't care how many files are in X11, but I'd like to have only 1 command to deal with it. In an ideal world you'd type in x11 -start or x11 -configure or x11 -do_my_laundry and one file and only one command would do absolutely everything. Actually... better yet, it should be x -configure or x -do_my_laundry with x11 also available, and just happening to be the default version invoked. (unless of course you were running some other type of x or something...)

    Anything else is just a pain to use.

    All that said, if you've got 2000 commands in your bin directory and each one represents a whole project with valid, original and useful functionality that you commonly use. All I've got to say is ye haw! (If only it were true...)

  198. Make VPFS - Virtual Package File System. by Petrus · · Score: 1

    It should be perfectly possible to make using rpmdb a bogus filesystem, which follows the hierarchy defined by distributor, mount it on /packages.

    It would either something like proc, completely in RAM, or data system actually written to the disk.
    The tree would end in symbolic links to the actually installed files. Every package's own directory would have file DESCRIPTION, that contains standard RPM header, executable UNINSTALL for rpm --erase or VERIFY for rpm -v.

    This way you would have the traditional {/usr;/usr/bin;/usr/share/doc} system to actually run Linux and /packages filesystem to browse and organize it.

    Any opinions?

    Petrus

  199. Practice making your pages more accessible by Anonymous Coward · · Score: 0
    That'll learn me not to preview.

    While you're at it try reading your own site without JavaScript. You have no genuine need for JS at all and yet your documentation—like your FAQ—(ostensibly there to persuade people to get your distro) can't be easily read without turning on something that is a continuing security issue and pain in the ass. I share your interest in a lean operating system distribution based on the Linux kernal but I was forced to give up on your GNU/Linux distro because I use links.

    Remember: the web is about global access. Keep all of the web's users in mind.

  200. 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.

  201. How things would work in an ideal world by nessus42 · · Score: 1

    What Unix should really do is have executables be directories, rather
    than be individual files. All the auxiliary files, man files, help
    files, and dynamic libraries would live in this directory. Then if
    you want to move an executable to a different place, you'd only have
    to use "mv", rather than rebuild the software package from source. To
    remove a package, you'd only need "rm -r". Package management tools
    would no longer be necessary at all. (You might want some dependency
    management tools, however, to tell you, for instance, that if you
    remove package A, that package B will not be able to work.)

    This, of course, would require a complete rearrangement of Unix, so
    it's not likely to happen. To do it really right would require kernel
    support to support executable directories, but it could be finessed by
    having "bin" directories contain only symbolic links to the real
    executables. An executable *can* figure out where it really lives in
    order to find auxiliary files that are located in the same directory
    as the executable, even in the face of running through a symbolic link
    (Python does this, for instance), but it's a fair amount of effort so
    very few programs actually do this. This capability could, of course,
    be provided by a library, however, if the Unix community were to wish
    to encourage developers to make all Unix software to work this way.

    |>oug

  202. Re:Why oh why? It does not work. by Petrus · · Score: 1



    We need this directories.
    We cannot have part of directory on the network, part local read/write, part local read-only.

    Stuff in /bin and /sbin MUST be local. That's where mount and login is. If the network breaks, that'w where you find commands to fix it.

    If we had it all in /programs/bin, we would either need 200GByte HD on all machines or when network breaks, or it would have to be on network.
    Bug you could not connect to network, since all the commands that start, run and diagnose the network are in /programs/bin on the network.

  203. Different Packaging by ParisTG · · Score: 1

    What if we did something like this:

    Each software package you download comes in one big file, but instead of extracting the thing all over your file system, you just stick it somewhere in a packages hierarchy, like so:

    /packages/graphics/gimp.package
    /packages/net/mail/pine.package

    etc., and write some software which will automagically go inside these packages and read any files from there. Then installing/uninstalling software is as simple as adding/removing one file.

    Other than some possible efficiency problems, is there any other issues with such a scheme?

  204. 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.

  205. 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.

  206. 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.

  207. 1 datum > 0 data by roystgnr · · Score: 1

    I knew I should have hit preview...

  208. crazy by staeci · · Score: 1

    some of the comments I've read here in the last 20minutes suggest to me that some people would be happy if they could do away with subdirectories completely and just have:

    /bin
    /boot
    /dev
    /etc
    /home
    /lib
    /mnt
    /proc
    /root
    /var
    and no subdirectories at all!!! except for /home, in which each user will get one subdir each, but no subdirs within it!!!

    --
    'Welcome to Rivendell, Mr. Anderson...'
  209. there's a standard for file locations??? by 1st+banana+man · · Score: 1

    as a newbie to linux knowing where to put and how organize files would help alot!!!!! I haven't found any info on this yet and at this point I only know enough to be dangerous. A book I've purchased suggests that program files (software packages) go to /usr or /opt? which is it?

    1. Re:there's a standard for file locations??? by Anonymous Coward · · Score: 0

      Current opinion on Slashdot (given the many, many comments above yours) seems to be "Take your pick - someone's bound to argue whatever you do."

  210. Reverse Symlinks? by Anonymous Coward · · Score: 0

    Consider the following. ln -r /opt/FOO/bin/foo /usr/bin/foo. ln -r /opt/FOO/man/man1/foo.1 /usr/share/man/man1/foo.

    It works like a symlink with a constraint. Upon removal of the original file, the symlink gets removed as well.

    /usr/bin could now have 1200 files, but you could remove the entire package with an rm -rf /opt/FOO, and the corresponding reverse symlinks would be deleted as well.

    Something like this could be implemented if the "directory entry corresponds to inode" becomes a two-way relationship. Intuitively, that seems to break a basic philosiphy, but what's the tradeoffs?

  211. Re:Linux From Scratch vs APT/RPM by castlan · · Score: 1

    I think you are missing the point here. The reason you claim to need LFS is that you do not have to use a package management system. If I understand correctly, that is because LFS does not include any sort of Package Management tool equivalent to dpkg or RPM. The solution gowen proposed is simple - don't type "dselect", don't futz with .rpm files. Install crap.tar.gz contents in /usr/tuttifruitty if you like. Then you have no problem. Debian won't try to overwrite anything, just don't encourage it to by doing something stupid like typing "apt-get crap" If you ignore the existence of package manager, then it won't try to manage your packages.

    Why does LFS neglecting to provide a package manager count as an advantage? It seems like you would complain about the God awful KDE interface ruining your user experience every time you kill GNOME and click on the KDE option in XDM. So your proposed solution is to install a distribution that doesn't provide an option for KDE.

    Does this make sense to you? The proper way to install stuff by hand on a Debian sytem is to place your stuff into a subdirecotry of /usr/local/. That way the Debian Package Manager won't touch it - while it controls the rest of /usr, /usr/local is off limits. The other option is don't screw with the package manager if you don't want package management. LFS is an interesting Distro, but not because it stares blankly at you when you type "dselect".

  212. FHS on virtual fs? by Anonymous Coward · · Score: 0

    Hmm I've just got an idea... (this might have been posted, but there is lots of posts to read thorugh).

    What if the entire FHS thingie was a virtualfilesystem like proc or devfs.
    You have real filesystem organized as a database where each app,progg,command,whatever had its own dir. And all was added in a convinietn database at the beginning of the fs. When the fs get mounted the kernel reads the database and creates a virtual FHS compilant filesystem.

    It will still be lots of files in /usr/bin but uninstalling a program would be as easy as removing its dir from the real fs.

    With proper handling this could solve a lot of problems AND remove the FHS policy from userspace.
    If you use layers...
    RealFSFH --> FHS --> whatever-FH-you-want
    and files shuold be accesible at any layer...

    Perks:
    Package managment would be as easy as just puting the packet file on disk...
    Files can be accesed in diffrent FH layers...
    How files really are managed could be a problem between dist, kernel and fs developers.
    User can have their FH in anyway without breaking any packages.

    Not so good:
    RAM!!! It's going to be big db's...
    But we are moving towards more ram anyway, and the db could be optimized to just manged bin, and conf files.

    Well I don't know, bit of a radical change but it might be worth it...
    You might eaven be able to speedup file manipulation considerably

  213. It is not just PATH! by Anonymous Coward · · Score: 0

    what about LD_LIBRARY_PATH or ld.so.conf and LIBRARY_PATH or long gcc -L lines.

    Path is just the tip of the iceberg when installing software under their own directories. You also need to tell these programs where to find their libraries. And if these programs have the same libs then you have redundancy or you must know about and fix the issue, or you have to have installed the library first in a commonly searched directory...which is the current norm.

    Yep, I will thank all fans of /opt to stay off my system.

    NR

  214. /usr/porn has 26756 files... by Anonymous Coward · · Score: 0

    he he he

  215. Re:The Alternative? (do we actually need one) by Anonymous Coward · · Score: 0

    You've really found a good way to take a minor problem, and turn it into a major issue for the user. When i want to start a program i only use occasionally i don't want to have to look through the whole file system for it, i just want to type the name and have it start. Your way has no real benifit, casues most users lots of problems, and may end up as a security problem.

  216. Package Encapsulation is what matters. by anon+mouse-cow-aard · · Score: 1
    I keep clear of /usr/local because it is too ingrained
    in a lot of apps, and tends to have far
    deeper directory trees. Better to go with /opt.


    To see the depths
    to which this insanity can go, look at building gcc
    for multiple paltforms over LUDE (logitheque
    Universitaire Distribuee et Extensible) Don't
    get me wrong, the package does it's job, it's
    just that the result is pretty ugly...


    (gcc & LUDE both take into account architectures,
    so you have nested architecture trees three or four
    levels deep.) the rationale goes back to the bad old days
    when /usr/local was NFS mounted from servers,
    potentially on different types of workstations.
    With modern hard disks, this case should be
    far less prevalent.


    /opt came about for third party commercial apps,
    originally, I think for Solaris systems. It was an
    attempt to give ISV's somewhere to put things that
    did not upset those persnickety Sysadmins, who all
    had very set ideas about how /usr/local should be
    used (usually, there was no isolation of packages,
    just a jumbled mess.)

    /opt based setups tend to be younger and leaner (
    ie. they do not account for multiple architectures.)
    They often make use of the one directory per
    package convention, So they are usually the better
    choice.


    That said. It doesn't actually matter whether you
    use /usr/local or /opt. Either one will become an
    intractable mess unless you use some form of package
    encapsulation. (ie. a la depot, or one dir/app.)


    Package encapsulation is what is important.

  217. My way of doing it is... by memyselfandmyhand · · Score: 0

    ... To have catagories for small apps/single binaries
    /usr/bin/mm for multimedia
    /usr/bin/system for system apps
    /usr/bin/editors for text editors
    /usr/bin/graphics/ for graphics
    /usr/bin/net/ for internet/networking
    and set the path to use all of them.

    Large Applications go in /opt
    /opt/kde
    /opt/gnome
    /opt/staroffice
    /opt/jdk1.3

    Data files go where the app wants them. usually
    /usr/share

    and so on.
    This works quite well. I dont have thousands of binaries in one directory, and I dont have a huge $PATH. It also makes finding and deleting unwanted programs easy.

    I use a Redhat system, but I generaly dont touch RPM, I compile from source, or extract the rpm and install binaries manually (Something tells me I should get slackware). If RPM gave you more control over where things went, then I would use it. But it has too many limitations at the moment.

  218. completely inadequate by David+Jao · · Score: 1
    Easy. Go to the program's install directory and type dir /S >list.txt. If it isn't in the directory, it doesn't belong to the package.

    This does not work. Many packages install files outside of their directory. For example, I consider start menu shortcuts, dlls in c:\windows, and desktop shortcuts to be part of the package.

    As just one example, Microsoft IE6 installs dozens of files outside of the main program directory.

    I assume you are talking about executables or DLLs, in which case Microsoft has had a program available for a long time called Dependancy Walker.

    I agree that it is easy to see what dlls an .exe uses. But the reverse is, as far as I know, completely impossible on Windows: namely, given a dll, output a list of all .exe's that use that dll.

    On linux with package managers this is a triviality. And you have to agree that this is useful functionality--if I want to know whether a dll on my system is needed or not, then I need to have a list of what exe's use it.

  219. Telnet is your link to the past. by castlan · · Score: 1

    Perhaps you mean to say
    "underfuntional bloated web interfaces are your enemy"
    or
    "superfluous GUIs suck, CLIs are your friend"
    or something along those lines. How about "libNEWT is your friend"?

    I still support "SSH is your friend" despite it not being the point you seem to have intended, unless you meant it in reference to Web management consoles exhibiting great suckage compared to more straightforward textual interfaces. Then perhaps the SSH statement fits.

    WRT port services, wouldn't netcat be a better answer than telnet? The way I see it, "telnet is your occasionally useful historian" for legacy purposes only.

  220. 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.

  221. Admit it. by line-bundle · · Score: 1

    In this regard UIX has a real problem. It seems a lot of people think the current UNIX way is the only way to arrange files.

    I am beginning to believe the unix (linux in particular) crowd has blinkers on, and will not see the faults of their system.

  222. Pity the virus by Tony-A · · Score: 1

    that has to propagate itself through that mess.

  223. Forgot M$ Windows =:-b by Anonymous Coward · · Score: 0

    Almost every DLL, OCX, ... goes into /Windows.

    Sure symlinks do not exist. The closest one can get is shortcuts or the old join command, but neither works for this.

    Any complaints? Nope. Just reformat and reinstall everything once in a while... About every 2 to 3 years is perfect: just in time for a new OS version (that will not work with the "old" hardware anyway) - i.e., if the system doesn't faults before...

    Did I also mention the Windows registry?

  224. MIME types? by Anonymous Coward · · Score: 0

    Isn't this like the Macintosh had since long ago? Pretty clean solution.

    BTW, Windows adopted a less clean variation -- associating file extensions with executables.

    MIME types would had been a better approach, and more *nix-like.

  225. an easy reason ... by Anonymous Coward · · Score: 0

    I only need to find duplicates at

    dpkg -L `dpkg -l \* | tail +6 | tr -s ' ' | cut -f2 -d' ' | tr \n ' '` | grep /usr

    with | sort | my.a.out to probe if there are bugs, xD

  226. easy solutions - Re:Why windows doesnt... by Arleo · · Score: 1

    Use good old doskey or the 4nt aliases to create macro's, either to the executable or to the shortcut. Currently my 4nt startup batch consists of more than 100 aliases to programs. I only use the commandline to invoke these programs.

    arleo

  227. 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
  228. 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.

  229. Redhat package management sucks by castlan · · Score: 1

    Try Debian instead.

    $ apt-cache search ldap2
    libldap2 - OpenLDAP libraries.
    libldap2-dev - OpenLDAP development libraries.
    libopenldap1 - OpenLDAP libraries (obsoleted by libldap2).
    $ apt-cache show libldap2
    Package: libldap2
    Priority: important
    Section: libs
    Installed-Size: 430
    Maintainer: Wichert Akkerman
    Architecture: i386
    Source: openldap2
    Version: 2.0.14-1
    Replaces: libopenldap-runtime
    Depends: libc6 (>= 2.2.3-7), libsasl7
    Filename: pool/main/o/openldap2/libldap2_2.0.14-1_i386.deb
    Size: 174132
    MD5sum: 2a3b44f7c257d854e0a700624739e9ed
    Description: OpenLDAP libraries.
    These are the run-time libraries for the OpenLDAP (Lightweight Directory
    Access Protocol) servers and clients.

    Somewhat less than a full generation old in the Debian camp. OpenSSL is at least 0.9.6. Pine has to be built from source so as to not violate its copyright, but Debian provides the source and Debian diffs in their package manager all set to build. As for installing libraries, it works out fine if you use the package manager to do it. If you can build the libraries from source, then you are competent enough to make a package from that very same source. If there is a problem, then using the equivs package can convince your system that dependancies are met.

    As for having the Package Management system look around your system to satisfy dependancies, perhaps Red Hat should do that. Debian dependancies are more sophisticated that "is that file present?" They need version information as well, which can be troublesome if you consider the variations possible with open source. Debian can only verify binaries which it generates. The best way to do that is by downloading directly from their archive.

  230. Red Hat's guilty, here are solutions. by castlan · · Score: 1

    How in the hell was the parent moderated up to 3?
    I have seen multiple solutions posted while browsing at moderator level 3. Am I going to have to start browsing at 4 now?

    There is no standard in Windows like the FHS, only Microsofts latest guidelines which don't to my knowledge address proper Start menu behaivor. Every app I know that tries to put a shortcut directly in the Start menu gives an option between having it in the start menu, on the desktop, and in the IE launch bar. The exception I've seen is AOL launcher, primarily because it is preinstalled. I will agree that the Windows Start Menu needs a coherent management scheme published.

    Limiting your experience to Red Hat and Mandrake and then proclaiming anything about "everyone's guily" is silly. Mandrake is all but another distribution of Red Hat. Might as well make a blanket statement after using Debian and Progeny. There are many statements praising recent Slackware versions for using /opt as part of a solution, for example. Slack is most unlike Red Hat and its many derivatives.

    The FSS is not intended to make organizing one's hard drive any easier, but to make distributions less likely to interfere with your organization. That is what makes /usr/local useful. Perhaps the solution for you would involve /usr/local/apps, /usr/local/utils, etc. (/usr/local/etc? :P) Everything you compiled belongs within /usr/local/ if you choose to adhere to the guidelines set out in the FHS. Within that framework, you can organize by function, or whatever else you fancy.

    As for the distribution system, I don't see that such arbitrary classification is as useful for filesystem layout as grouping by the application's title. There are better places for those distinctions, like in the "Start Menu". In Windows, ideally, everything is installed into its own directory as much as possible, while the Start Menu is grouped more by user functionality.
    In response to the anonymous coward of message #2596088, in Debian, the best place for such things as /usr/internet or /usr/editor exists in the /etc/alternatives directory. Try "man update-alternatives". While /etc/alternatives/infobrowser exists for .html help pages, perhaps there sould be an /etc/alternatives/webbrowser entry.

    /home is far from irrelevant. It is the only place where non-sysadmin related files should reside, unless they are being served over a network or removable media. Any non-root user should never have reason to leave /usr/home, provided all PATH environments are properly configured. Keeping personal files scattered throughout /bin directories is a better way to "sure-fire confusion".

    The best way to have an organized hard disk is to have a reasonable set of guidelines you follow on filesystem layout. After that, just follow them! The best way to fight entropy, is of course, to do something useful! After you die, then you should emprace entropy. I suspect that the rhetoric of apathy in these two statements garnered your 2 "insightful" moderations. Give me a break, learn some discipline and organization.

    ----

    As to the solutions that "nobody" has offered to this problem of clutered and unwieldly /bin directories, try browsing at a high moderator number, and see a range from:
    1. No problem, who cares what the Filesystem looks like when the Package manager suits your needs;
    2. Use one of the automated soltions listed at the Opt Depot like GNU STOW;
    3. Keep all "applications" in subirectories in /opt, with appropriate links in /usr/bin. For systems w/package management, make that /usr/local/bin as in #2595732
    4. Keep only one symlink for any "application suite" in /usr/bin, which calls the appropriate executable depending on its flag;#2598189
    5. My least favorite - expand your PATH variable to include every /bin subdirectory in the /usr hierarchy. ##2595676

    Note to self:
    ##2596072 gives a reference and addresses the shortcoming of current Debian Package Management - concurrent divergent versions of applications.

  231. and what I do... by Anonymous Coward · · Score: 0

    prime example :
    redhat 7.1 comes w/ an outdated version of openmotif (uil compiler doesn't work w/ our software due to some unapplied patch...dunno...ask the programmers) - so I grab latest source and/or patches (patches in the openmotif case), update the RPM to that level, rebuild w/ a suffix indicating my modification, TA-DAA - done in ${BUILD_TIME} + 5-30 minutes (even for those long pissy kernel and glibc RPMS...)
    and it makes it great to add in commands/scripts to %post to do things like update lilo or other config files (so that you don't end up w/ the guy who just blew up last week's server by spilling Hi-C into the power supply going "gee, uh I upgraded the kernel, rebooted, and it just hung..." )
    so there - package management is a good thing - but then again, so is a clean directory structure

  232. 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
  233. best of both worlds? by scraggly+codger · · Score: 1

    On my RH systems, I often download tarballs and build from source in /usr/local, but I install using checkinstall which creates an RPM on the fly by monitoring the package installation. Then I can have the benefits of package management (especially uninstall and query capabilities) while keeping up-to-date on sources.

  234. Re:The Alternative? (do we actually need one) by A_Milne · · Score: 0

    Please note the phrase STUPIDLY COMPLICATED.

    It wasnt meant to be a serious suggestion

    What happened to the art of sarcasm without the overuse of smileys. It died.

    Andrew Milne

    --
    Flame my comments, not me.