Andrea Turrini said the following on 05/12/2013 09:42 AM:
On 05/12/2013 03:06 PM, Anton Aylward wrote:
Andrea Turrini said the following on 05/12/2013 08:19 AM:
This topic is the use case: how can I remove specific directories inside /tmp after 3 days while keeping the 10 days /tmp general cleaning?
Stated like that it is inadequate.
* Three days after what?
After the creation time, or whatever is used for comparing with the age.
DANGER WILL ROBINSON! DANGER! Go though the rest of the file system and look at directories that were CREATED many days ago that contain newly created files or at least files that were created long after the directories or the parent directory of those directories were.
* Why? Are they taking up needed space?
They are filling /tmp thus making more difficult to visually look for files in /tmp. And I do not see why if they are not taking up needed space, then this should not be a problem. Are you saying that since they do not take up needed space, then it is OK to let them to fill [/var]/tmp without bounds?
First, what's this 'without bounds'? Second, are they really taking up space? Try running 'df' and see if your /tmp is critical. it sounds like this is an aesthetic argument, which is really unanswerable. I see other 'junk' created in my /tmp from things like ssh, adobe, various caches, ssh and gpg, plugins to thunderbird, PPD files from CUPS (LOTS! of them!), email attachment files I've viewed, and more. All these are more significant than empty directories. As for the aesthetics - what are you looking for in /tmp? Because if that is the real issue then THAT is the core of the "use case", not deletion. Well, what about /var/spool/postfix? Under ./defer and ./deferred there are many directories and hopefully they are empty. Are you going to add those to your list of directories to delete? Why not? Oh, right, its not an aesthetic issue.
* What if they are still in use or still needed by some active process or process that will become active periodically?
If I know this can not happen, then this is not a problem. If I am not sure, I can change the age or keep the dirs there.
I wouldn't fiddle with the age of system created directories if I were you. There's an IF here that remains unfulfilled.
BTW, this argument affects also the current system provided files wrt content (if any) of such directories: since
X /tmp/systemd-private-*
and from the manpage: X: Ignore a path during cleanup. Use this type to prevent path removal as controlled with the Age parameter. Note that if path is a directory, content of a directory is not excluded from clean-up, only directory itself. Lines of this type accept shell-style globs in place of normal path names.
That seems good advice and translates, in my mind, to 'leave it alone. The 'contents' might take up space or belong to aged/dead processes and they will be cleaned up.
Can you ensure that everything is OK if the content is still in use or still needed by some active process or process that will become active periodically?
*I* can't guarantee anything about *YOUR* system. Personally I think you're making a big issue of something that is going to go away anyway. -- Quality is not an act - it is a habit. - Aristotle -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org