Linux MintThis forum is for the discussion of Linux Mint.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I created a file in /tmp and was surprised to find it gone after I rebooted, as I see nothing in /usr/lib/tmpfiles.d or in /usr/lib/systemd/system or in /etc/init or in /etc/rc?.d that removes files from /tmp. The /tmp directory is part of the root filesystem and is not memory-based. I want files in /tmp to survive a reboot and therefore want to suppress their removal; where are they being removed? The relevant line from /etc/os-release is VERSION="19.1 (Tessa)". Thank you in advance for any and all replies. jay at m5 dot chicago dot il dot us
"I see nothing in /usr/lib/tmpfiles.d ...
that removes files from /tmp"
The relevant line from /usr/lib/tmpfiles.d/tmp.conf is:
D /tmp 1777 root root -
The hyphen at the end of the line means that no
automatic deletion is done. I do not recall editing
this file (and I would not, I would copy it into
/etc/tmpfiles.d and edit the copy), so therefore
that is what you will find in every LinuxMint 19.1
system. My original question stands: What is causing
the files in /tmp to not survive a reboot on a
LinuxMint 19.1 system? Thank you in advance for
any and all replies.
/tmp is (usually) a part of RAM mounted into the filesystem. It's volatile. It goes "poof" when you switch the machine off.
You could change that, but if you need to ask, better don't, and simply put your stuff elsewhere.
How about creating a directory "~/tmp" (in your $HOME) that conatins the sort of stuff you want to put in it?
Distribution: Ubuntu based stuff for the most part
Posts: 1,177
Rep:
You might find this discussion interesting; https://serverfault.com/questions/37...cleared/377349
It is a bit old, but answers your question for most distros on how /tmp is cleared. You may find the last post is the way to go.
Last edited by uteck; 11-01-2019 at 09:58 PM.
Reason: add snark
As I mentioned in the original posting (and as noted by
rkelsen): "The /tmp directory is part of the root
filesystem and is not memory-based". Thus:
$ df /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/landru-mint 15481840 13016744 1678664 89% /
$
On LinuxMint 19.1, /tmp is not a separate mountpoint.
(Incidentally, /etc/init is almost completely gone in
LinuxMint 19.1; on my system it contains only
anacron.conf and lightdm.conf. This is to be expected,
as LinuxMint 19.1 runs systemd, not upstart:
$ ls -l /sbin/init
lrwxrwxrwx 1 root root 20 Jun 26 19:39 /sbin/init -> /lib/systemd/systemd
$
)
Files that I create in /tmp on a LinuxMint 19.1 system
do not survive a reboot. Where is this done?
I've added this myself on a specific system. Does an installation actually just arbitrarily consume RAM for /temp storage? Did it give you any options or choices? or do you just loose the RAM no matter what? ...regardless how little/much you have or drive partitioning schemes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.