Web Excursions 2021-11-12

Id with an i on Twitter: "I'm "still afraid to use spaces in file names" years old" / Twitter

I'm "still afraid to use spaces in file names" years old


  • The standard is, indeed, excessively vague because it was written to let many existing implementations be conformant as is,

    • though I’d say it’s still more helpful than many other standards with that deficiency.

  • There’s a method to it, however:

    • Things installed in /, if it’s different from /usr, are generally not to be touched;

    • Things installed in /usr are under the distro’s purview or otherwise under a package manager, any modifications are on pain of confusing it;

    • Things installed in /usr/local are under the admin’s purview and unmanaged one-offs, there are always some but overuse will lead to anarchy;

    • Things installed in /opt are for whatever is so foreign and hopeless in not conforming to the usual factoring that you just give up and put it in its own little padded cell (hello, Mathematica);

    • Everything is generally configured using files in /etc, possibly with the exception of some of the special snowflakes in /opt;

      • the package manager will put config files meant to be edited there and expect the admin to merge any changes in manually,

      • and sometimes put default settings meant to be overridden by them in /usr/share (see below)—both approaches can be problematic,

      • but the difficulty is with migrating configuration in general, not the FHS as such.

  • There used to be additional hierarchies like /usr/X11R6, and even a /usr/etc on some (non-Linux?) systems,

    • but AFAIU everyone agrees their existence makes no sense (anymore?),

    • so much that even FHS doesn’t lower itself to permitting them.

  • The distinction between / and /usr might appear to be pointless as well, and nowadays it might be (some distros symlink them together),

    • but previously (especially before initial ramdisks were widespread) stuff in / was whatever was needed to bring up the system enough

    • that it could netmount a shared /usr.

  • Inside each of //usr and /usr/local

    • there is bin for things that are supposed to be directly executable, whether binary or a script and all in a single place;

    • share and lib for other portable and non-portable (usually but not necessarily text and binary) shared files, respectively, segregated by application or purpose;

    • finally, due to the dominance of C ABIs and APIs on Unices, the top level of lib also hosts C and C++ library files

      • and there’s an additional directory called include for the headers required to use them.

    • Some people also felt that putting auxiliary executables (things like cc1, the first pass of the C compiler) inside lib was awkward

      • so they created libexec for that purpose,

      • but I don’t think the distinction turned out to be particularly useful so not all distros maintain it.

GoboLinux - the alternative Linux distribution

GoboLinux is an alternative Linux distribution which
redefines the entire filesystem hierarchy.

In GoboLinux you don't need a package database because
the filesystem is the database: each program resides in its own directory.

dharple/detox: Tames problematic filenames

  • Tames problematic filenames. Contribute to dharple/detox development by creating an account on GitHub.

  • detox is a program that renames files to make them easier to work with under Unix and related operating systems. Spaces and various other unsafe characters (such as "$") get replaced with "_". ISO 8859-1 (Latin-1) characters can be transliterated to ASCII, as can UTF-8 characters.