The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tmpwatch query

Discussion in 'General Discussion' started by santrix, Apr 19, 2010.

  1. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Hi...

    I noticed old session files just building up in /tmp on one of my servers. Loking at /etc/cron.daily/tmpwatch I see:

    Code:
    flags=-umc
    /usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
    	-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp
    /usr/sbin/tmpwatch "$flags" 720 /var/tmp
    for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
        if [ -d "$d" ]; then
    	/usr/sbin/tmpwatch "$flags" -f 720 "$d"
        fi
    done
    I don't understand the flags=-umc statement. If I test the statement using umc, then it won't remove the old sess* files..., although according to the man page

    using -umc should INCREASE the chances of deleting a file, not reduce it...

    But if I remove the "u" from the switches, then the sess* files get removed... This seems to contradict the explanation in the man page completely.

    Steve
     
    #1 santrix, Apr 19, 2010
    Last edited: Apr 19, 2010
  2. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Found it... tmpwatch has some ambiguous/flaky grammar in the man page.

    https://bugzilla.redhat.com/show_bug.cgi?id=468670

    Might clarify if it said:

    Maximum time as per file unix timestamp, but for most people the maximum time being talked about is usually interpreted as meaning the difference between the timestamp and now().

    Oh, just delete this thread, I'm rambling.
     
Loading...

Share This Page