Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> is tech debt

Or it's useful system behaviour.

To-MAY-to, to-MAH-to.

> […] should exist under a proper /var/{cache,lib} directory.

Are these directories available to regular users like the tmp dirs are?



/home/.cache/ is for regular users.


System users often don't have a real home directory, but need somewhere to write files too.


If feel like this is the moment where these discussions about old filesystem layouts start to go in circles.

Yes, system users tend to not have a home directory. But you are fully able to create one for a new system user if this is what you want to do.

You are also able to create all kinds of temporary directories and read-only filesystems for a process (e.g. using systemd) if this is what you want do to.

Yes there is a lot of fragmentation and no real standard, which is a little disappointing, but you sure have options to work with. And these options do not have to involve any legacy-ish filesystem components like /var/tmp that nobody knows the purpose of.


> filesystem components like /var/tmp that nobody knows the purpose of

The purpose of /var/tmp is temporary files that should survive a reboot. A potential example where that would make since is a partial download file. It is only needed temporarily but if a reboot happens while the download is in progress, you probably don't want to have to start over.

Also if /tmp is or might be a tmpfs, it is probably desirable to use /var/tmp for larger temporary files that don't fit in RAM.


and /home/.aws/, /home/.config/, /home/.docker/, /home/.dotnet/, /home/.dropbox/, /home/.mplayer/, /home/.vscode/, ...


disclaimer: IIUC, never experienced first hand.

/var was originally for network booting machines. / is read-only fileshare and /var is for user storage. /home -> /var/home too. It's campus wide workstations installation type of thing.

So, /var/tmp is kind of wrong, and so is /var/log/messages on a laptop, and besides the entire /var is useless on most systems. But it's not a huge waste of resources either, so it's left as it is along the rest of directories under / for years.

/var wasn't originally intended to be a system directory, it's just a variables directory. Almost by definition it's writable.


> disclaimer: IIUC, never experienced first hand.

I have run (Sun) workstations off of NFS, including completely diskless ones. /var was often done on a per-workstation basis.

(I'm actually planning out a diskless HPC cluster that will be deployed in the coming months.)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: