← Back to context

Comment by Spivak

4 years ago

I mean we're heading there with /usr being your /System. Redhat/Pottering are doing heroic work in this space.

    /Users -> /home
    /System -> /usr
    /Data -> /var
    /Config -> /etc
    /Boot -> /boot
    /Ephemeral Temp -> /run
    /Persistent Temp -> /tmp

The only real holdouts are proc/sys/dev which are the kernel and mnt/media/opt/srv which are really for the user/sysadmin and aren't really used by the OS anymore.

Genuine question: on what systems is `/tmp` persistent? Both macOS and Ubuntu 20.04 clear `/tmp` on every reboot for me, and I haven't changed the defaults at all.

  • Right, /var/tmp is the "Persistent Temp" directory, and /tmp is "Ephemeral Temp". The /run directory is for runtime data such as PID files, Unix sockets, named FIFOs, and generated systemd units—it has a specific internal structure and shouldn't be used as a direct alternative to the relatively unstructured /tmp directory. While both are generally ephemeral tmpfs mounts, only /tmp is writable to all users.

  • "Persistent Temp" should be /var/tmp. "Persistent Temp" is also an oxymoron.

    • > "Persistent Temp" is also an oxymoron.

      It's not an oxymoron to have files which are temporary but not limited in scope to a single power cycle. For example, you could have a long-running process which you want to be able to resume if it's interrupted; /var/tmp would be an appropriate place for the state. The data is temporary because it will be deleted once the process is finished, but you wouldn't want it wiped out by a system reset. Generally /tmp is cleared at every reset, and is often a tmpfs mount, while files in /var/tmp are automatically cleaned up only when they reach a certain age.

      2 replies →

    • Basically no one uses /var/tmp for anything (and nobody should either). World writable directories are a mistake and only continue to exist because apps assume they are available.

      /tmp and friends are poorly named. They really should be /shared or /dmz or /freeforall or something.

      * If you need service-specific tmp space use RuntimeDirectory or PrivateTmp if your app is hardcoded to /tmp.

      * If you need service-specific persistent data that goes in /var/lib/your-app.

      * If you need temp space for your user it's at /var/run/user/your-uid.

      * If you need more than one user/service to share files but not everyone then god have mercy on your soul because all options are bad. There sure are a lot of them but none of them are at all satisfying.

      1 reply →

  • People don't reboot often. Persistent tmp basically means it will be cleared in an infrequent manner, so the likelihood of it going away 1s after you release your file handle is low.

I'm not sure I'm a fan of the capitalization and spaces, other than that I'm all for more self-explanatory names.

  • Why not? That's how proper English text is written. Of course there are many programs that can't handle it properly (or handles it inconveniently) so in practice it might be problematic at times, but otherwise I see nothing wrong with it.

    • Why compare with English? It's computer domain, it's not a book or a poem. It should be clear and unambiguous.

      Caps are annoying to type, and difficult to remember (Do You Caps, or Do you caps, or DO YOU CAPS, etc).

      Spaces are nuisances that bring no benefit. At best we should use non-breaking space for filenames, but that would be even more atrocious.

    • Generally just because typing it out with tab completion in zsh sucks, and I don't see a good solution (if it was solved nicely it'd be solved already)