You are not logged in.

#1 2012-09-19 18:42:46

mgushee
Member
From: Englewood, CO, USA
Registered: 2004-11-28
Posts: 59
Website

Files disappearing from /var/tmp

I don't know if this is the right section of the forum for this topic, but I can't see a better one.

I have a long-standing habit of using /var/tmp as a general dumping ground for files that I want to keep but am not sure where to put. Although this is probably not a very good habit, I've never really had an issue with it until now. All of a sudden, I noticed today that most of the files I had in /var/tmp/ (and the many subdirectories I've created under it) are gone.

There is no obvious pattern to what has disappeared and what remains ... I think most of the files were PDFs, JPEG images, Zip or tar.gz archives, and text files. Some of each of those file types are still there, but most are gone. So, for example, I couldn't have done something like 'rm /var/tmp/*.pdf'. I will also note, though this doesn't *prove* anything, in 16 years of using Linux I have only inadvertently deleted files 5 or 10 times--and never a large number of them.

Did the older files somehow get deleted? I don't think so ... unless, perhaps, "older" is based on *access time*, because, based on modification time, the remaining files range from a few days to 3 years old.

Hard disk issues? Maybe, but I did the following:

  # telinit 1
  # [logged in]
  # umount /var
  # fsck -c /dev/sdb1      [that's the partition I mount @ /var]

The final message said:

  *** THE FILE SYSTEM WAS MODIFIED ***
  76034/732960 files (6.1% non-contiguous), 1792157/2929846 blocks

There was no other indication of problems, and this message seems very similar to the output of the routine fsck's performed at boot time.

I'm wondering if this has something to do with my recent upgrade--maybe with the new filesystem package? I did a full system upgrade on September 11, after having put it off for a long time ... so I got the new filesystem & glibc packages, along with a whole bunch of other stuff. And I don't know when the files disappeared, but it has to have been some time in the last month, and it could have happened at the time of the upgrade.

Any ideas as to what's going on, or tips on how to investigate further?

TIA!


Matt Gushee
Englewood, CO, USA

Offline

#2 2012-09-19 18:51:42

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Files disappearing from /var/tmp

Have a look at /usr/lib/tmpfiles.d/tmp.conf. Basically /var/tmp is cleared every month. If you want to change that behavior, see man 5 tmpfiles.d.

On a side note, storing stuff in /var/tmp is a bad idea -- use a folder in your homedir.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB