-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-04-25 at 19:27 -0400, Anton Aylward wrote:
Carlos E. R. said the following on 04/25/2013 07:05 PM:
Telcontar:/etc/cron.daily # ls -ltr /tmp | grep cer | head drwx------ 2 cer users 299008 Jan 1 1970 orbit-cer [snip]
Those are directories
Yes.
and files:
srwxr-xr-x 1 cer users 0 Jan 31 2010 filezYgwBN [snip]
Those are not files, those are sockets.
Ah, you are right... Do I have files? [...] no... so that's it.
I have edited the shebang of "/etc/cron.daily/suse.de-clean-tmp" to "#!/bin/sh -x". This is a manual run:
[snip]
+ find /tmp/. -xdev '(' '!' -user root ')' '!' -type d '!' -type s '!' -type p '(' -atime +30 -a -ctime +30 ')' -exec /usr/bin/safe-rm '{}' ';'
Help me here. It looks to me as if the '!' -type d means that it ignores directories and that the '!' -type s means to ignore sockets.
I didn't analyze the line that much, I'm afraid. I have never used such complex find searches myself, so those "details" did not jump to my sight.
So the stuff you have listed above is ignored
Right.
Why does it not find old files and directories?
Because its been configured to ignore directories and those other things are sockets not files.
Yes, and those directories I looked into contain sockets.
Well OK, this is *NIX so "everything is a file", except network connections. cf Plan 9.
The issue of whether or not empty directories and sockets can be removed is a thorny one. With a machine that isn't being rebooted every day, a server rather than a workstation, its quite reasonable to assume that its going to have services that are active for more than 30 days :-) There may be good reasons for long lived sockets.
Yes, indeed. So, I have to look in /tmp now and then and clear manually :-) (perhaps sockets could be deleted if so many days older than the uptime of the machine. But then I remember that the uptime wraps around t 0 after I don't remember how many days...)
You can make a good case that these should be under /run rather than /tmp and I'd agree, but we have a lot of legacy code and there's no-one enforcing standards, threatening programmers with unemployment (or worse - writing documentation!) if they don't conform.
Argh, writing docs! That's naughty! Ok, ok... X'-) The problem is not really the script not cleaning up, but programs not cleaning after themselves. Have a look: drwx------ 2 cer users 4096 Mar 4 2009 keyring-EJGokz drwx------ 2 cer users 4096 May 14 2011 keyring-FVzWKv drwx------ 2 cer users 4096 Dec 2 02:36 keyring-GYuuSo drwx------ 2 cer users 4096 Mar 24 2009 keyring-Gi2hKk drwx------ 2 cer users 4096 Dec 23 2010 keyring-IV0iGJ drwx------ 2 cer users 4096 Dec 6 2009 keyring-Ik2Sjx drwx------ 2 cer users 4096 Mar 9 2008 keyring-Lh5r6P drwx------ 2 cer users 4096 Apr 17 16:30 keyring-MJJcSi ... drwx------ 2 cer users 4096 Feb 15 2011 seahorse-0E4zfa drwx------ 2 cer users 4096 Feb 3 2009 seahorse-0OmSoR drwx------ 2 cer users 4096 Jan 23 2009 seahorse-1G4VSv drwx------ 2 cer users 4096 Jul 20 2009 seahorse-1WBSkK drwx------ 2 cer users 4096 Mar 4 2009 seahorse-1e18Lb drwx------ 2 cer users 4096 Mar 19 2009 seahorse-2p8VIV drwx------ 2 cer users 4096 Jan 29 2011 seahorse-3AvwDt drwx------ 2 cer users 4096 Sep 10 2009 seahorse-3OGTDh drwx------ 2 cer users 4096 Dec 8 2010 seahorse-3gKRhV drwx------ 2 cer users 4096 Mar 24 2009 seahorse-42rkcB Those programs are not clearing when they close, and each time they start they create again another temporary folder, or socket, or whatever. - -- Cheers, Carlos E. R. (from 12.1 x86_64 "Asparagus" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAlF5zfoACgkQtTMYHG2NR9XoOgCZATrH4EdPMUBltrjy8VmAYZnK x/0An1fVh1oXwTZngYHkQulbqbgQs8Mo =XxKV -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org