Cleaning a directory in /tmp during boot updates the directory's modification time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mountall (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When TMPTIME is set to anything other than 0 (clean all of /tmp) in /etc/default/rcS, /tmp is cleaned of "old" files, but in doing so it updates the modification times of all the directories, so that they remain until they themselves become "old".
I hope this makes sense, an example:
During boot files in /tmp older than three days will be cleaned.
Files in /tmp/olddir will be cleaned.
/tmp/olddir will have its modification time updated, it is no longer an old directory.
/tmp/olddir is left behind because it is not recognised as an old directory.
It's minor and may be impossible to fix, but is there any magic that can be done to remove the old directories at boot rather than waiting for the directory to "expire" again? Is it possible to avoid the modification time being updated?
Simply removing the whole directory based on its creation or modification times, without first checking its contents for newer files, would probably not be preferable.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: initscripts 2.88dsf-
ProcVersionSign
Uname: Linux 3.11.0-26-generic i686
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu17.8
Architecture: i386
Date: Thu Jan 29 15:13:27 2015
MarkForUpload: True
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: sysvinit
UpgradeStatus: Upgraded to precise on 2014-12-07 (53 days ago)
summary: |
- Cleaning a directory in /tmp during boot updates the folder's + Cleaning a directory in /tmp during boot updates the directory's modification time |
description: | updated |
If a directory in /tmp has multiple subdirectories it means that the director[y|ies] can hang around for months, or even permanently. This shouldn't use a lot of disk space but will leave /tmp a bit of a mess.