←back to thread

Against /Tmp

(dotat.at)
140 points todsacerdoti | 1 comments | | HN request time: 0.001s | 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 #
1. ziml77 ◴[] No.41914729[source]
It's best to assume that any directory which holds temporary files for applications will be cleaned up at any time. The whole point of those directories is to hold things that need to exist somewhere but are ephemeral.