Philosophy: /root vs. /tmp

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Philosophy: /root vs. /tmp

Post by JASpup »

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

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
6502coder
Posts: 90
Joined: Mon Jul 13, 2020 6:21 pm
Location: Western US
Has thanked: 3 times
Been thanked: 22 times

Re: Philosophy: /root vs. /tmp

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

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: Philosophy: /root vs. /tmp

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

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
MochiMoppel
Posts: 1231
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Re: Philosophy: /root vs. /tmp

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

User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: Philosophy: /root vs. /tmp

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

User avatar
MochiMoppel
Posts: 1231
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Re: Philosophy: /root vs. /tmp

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

Post Reply

Return to “Users”