[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to prevent /tmp files from being deleted at reboot




/tmp is most likely a tmpfs, a filesystem in RAM which will vanish (and
all files and directories in it) as soon as the computer is rebooted.

No, it's a dedicated partition on disk.

But /tmp being wiped on (re)boot has been the norm and case for
UNIX-based operating systems since nearly forever. No program or user
should expect its/his files to persist in /tmp across a reboot. That is
what /var/tmp is for, a temporary place which will not be wiped upon
reboot.

Well, we used to have TMPTIME so that everyone could decide for himself how long "temporary" means.

If it's not possible anymore, it's a regression, and it's a Debian bug anyway, since the /etc/default/rcS file has a clearly documented setting which is in fact ignored.

But anyway, that's beside the point.

The point is that I cannot get the syntax right to achieve what the systemd documentation seems to imply: that it is possible to define when a file should be deleted in number of days, indepentently of arbitrary reboots.

So if someone knows what I'm doing wrong in trying to obtain the documented behavior, thanks for sharing.

MI


PS:
IMO: If you have a program that relies on files or directories in /tmp
being persistent, then that program is buggy, not Debian.

It's not a program. It's just me, mostly while setting up and testing a fresh system, which may need frequent reboots.


Reply to: