LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   antiX / MX Linux (https://www.linuxquestions.org/questions/antix-mx-linux-127/)
-   -   Preventing automatic removal of whole directory in /tmp (https://www.linuxquestions.org/questions/antix-mx-linux-127/preventing-automatic-removal-of-whole-directory-in-tmp-4175727656/)

zeroone 08-02-2023 11:12 PM

Preventing automatic removal of whole directory in /tmp
 
How to prevent MX automatically remove a whole directory in /tmp, i.e. it's correct that it must automatically wipe all directory's contents but must keep the directory itself live ?

wpeckham 08-02-2023 11:35 PM

No. In many distributions /tmp is not even a real directory, it is a virtual directory that does not survive shutdown (think a special kind of ramdrive).

Even where it is on physical storage, the entire purpose of /tmp is transient data that does not need to be retained past short term usage.

If you have something you need to retain, /tmp is the wrong home for it and you should find another place.

pan64 08-03-2023 01:35 AM

yes, better to use another dir, outside of /tmp, and if you wish you can create a symlink in tmp pointing to the other location.


All times are GMT -5. The time now is 04:34 AM.