Page 1 of 1

Philosophy: /root vs. /tmp

Posted: Wed Sep 08, 2021 5:25 am
by JASpup

Is the philosophy of using /root vs. /tmp for discretionary volatile storage that /tmp will never accidentally get saved in a PUPSAVE?


Re: Philosophy: /root vs. /tmp

Posted: Wed Sep 08, 2021 9:14 pm
by 6502coder

Temporary stuff should always go in /tmp, that is what is it for. There is no reason to clutter your home directory with crap that does not need to be preserved. Whenever I see an app or script that writes temporary files to /root I want to track the author down and kick his ass. What happens when that app crashes or aborts? Nine times out of ten it leaves crap in /root. Then one day you run across this crap, you have no idea where it came from and whether or not it is safe to delete. This is lazy, undisciplined coding of the worst sort.


Re: Philosophy: /root vs. /tmp

Posted: Thu Sep 09, 2021 5:06 am
by JASpup

I just tried to load a .sfs from /tmp with a nice little 'you can't do this' warning.

I like the idea of planned impermanence, but it takes a while to get it.


Re: Philosophy: /root vs. /tmp

Posted: Thu Sep 09, 2021 6:44 am
by MochiMoppel
6502coder wrote: Wed Sep 08, 2021 9:14 pm

Whenever I see an app or script that writes temporary files to /root I want to track the author down and kick his ass.

You mean something like DL_PATH=/root?
Now track down the authors of PPM and report back how it went ;)

What happens when that app crashes or aborts? Nine times out of ten it leaves crap in /root.

That's an annoyance, not a problem. The real problem is that stuff in /root reduces the calculated amount of "personal storage" while stuff in temporary folders is not affected. A browser cache can fill the personal storage gradually, a huge download to /root can fill it up in a matter of seconds and freeze the system.


Re: Philosophy: /root vs. /tmp

Posted: Thu Sep 09, 2021 6:55 am
by amethyst
MochiMoppel wrote: Thu Sep 09, 2021 6:44 am
6502coder wrote: Wed Sep 08, 2021 9:14 pm

Whenever I see an app or script that writes temporary files to /root I want to track the author down and kick his ass.

You mean something like DL_PATH=/root?
Now track down the authors of PPM and report back how it went ;)

What happens when that app crashes or aborts? Nine times out of ten it leaves crap in /root.

That's an annoyance, not a problem. The real problem is that stuff in /root reduces the calculated amount of "personal storage" while stuff in temporary folders is not affected. A browser cache can fill the personal storage gradually, a huge download to /root can fill it up in a matter of seconds and freeze the system.

I don't use a savefile nor savefolder but a savefolder would solve the personal storage problem, wouldn't it (if the partition is large enough)?


Re: Philosophy: /root vs. /tmp

Posted: Thu Sep 09, 2021 7:35 am
by MochiMoppel

It's not the user's job to prepare excess storage room for stuff that doesn't belong there in the first place. It is the coder's job to place temporary files into a temporary area. An while we are at it: It is also the coder's job to clean up temporary files when they are no longer needed.