←back to thread

Against /Tmp

(dotat.at)
140 points todsacerdoti | 2 comments | | HN request time: 0.015s | source
Show context
tmountain ◴[] No.41913914[source]
Things goes along with the author's "tmp cleanup" section, but I have lost valuable work on a number of occasions from hacking on random files that I created in /tmp under the assumption that they were throwaway junk files, only to reboot my machine a few hours later and have them automatically deleted by the OS. It's much safer and just as easy to use a "$HOME/tmp" dir as a junk drawer and then manually clean it up from time to time.
replies(4): >>41913944 #>>41913967 #>>41914063 #>>41914729 #
akdev1l ◴[] No.41914063[source]
You can use /var/tmp for this purpose

It is not cleared between reboots

replies(2): >>41914167 #>>41914745 #
1. SoftTalker ◴[] No.41914167[source]
Depends on the OS. In OpenBSD, /var/tmp is a symlink to ../tmp and is so is cleaned on reboots and periodically.
replies(1): >>41914576 #
2. akdev1l ◴[] No.41914576[source]
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.htm...

Yeah it’s a Linux/FHS thing.