Skip to main content

tmpwatch help

Comments

6 comments

  • ITGabs
    Hi John, I think is better that you use the tmpwatch command directly, I never edited that file manually but I see that there are some variables $flags and $d so if you edit that cron manually you will get in trouble probably I am using Centos 6.x but tmpwatch should be exactly the same that in 5.x root@tulkas [/home/securwp]# tmpwatch tmpwatch 2.9.16 - (C) 1997-2009 Red Hat, Inc. All rights reserved. This program may be freely redistributed under the terms of the GNU General Public License version 2. tmpwatch [-u|-m|-c] [-MUadfqtvx] [--verbose] [--force] [--all] [--nodirs] [--nosymlinks] [--test] [--quiet] [--atime|--mtime|--ctime] [--dirmtime] [--exclude ] [--exclude-user ] root@tulkas [/home/securwp]#
    The following code will remove all files from /tmp if they are not accessed in the latest 24 hours tmpwatch --mtime --all 336 /tmp
    -Gabriel
    0
  • johnchristy
    [quote="ITGabs, post: 1591152">Hi John, I think is better that you use the tmpwatch command directly, I never edited that file manually but I see that there are some variables $flags and $d so if you edit that cron manually you will get in trouble probably I am using Centos 6.x but tmpwatch should be exactly the same that in 5.x root@tulkas [/home/securwp]# tmpwatch tmpwatch 2.9.16 - (C) 1997-2009 Red Hat, Inc. All rights reserved. This program may be freely redistributed under the terms of the GNU General Public License version 2. tmpwatch [-u|-m|-c] [-MUadfqtvx] [--verbose] [--force] [--all] [--nodirs] [--nosymlinks] [--test] [--quiet] [--atime|--mtime|--ctime] [--dirmtime] [--exclude ] [--exclude-user ] root@tulkas [/home/securwp]#
    The following code will remove all files from /tmp if they are not accessed in the latest 24 hours tmpwatch --mtime --all 336 /tmp
    -Gabriel
    Thank you for the comment Gabriel, but it seems like the files are different and I'm not quite sure what is the meaning of the timing involved here. From the code I pasted do you know where it defines a timeframe? for example after 24hrs these files will be removed?
    0
  • cPanelMichael
    Hello :) The following post should be of help to you: Tmpwatch Every 24 Hours Thank you.
    0
  • johnchristy
    Hello Michael, Thank you very much for this guide. I have edited /var/spool/cron/root will post the result within 24-48hrs Thanks
    0
  • johnchristy
    Works great. Now my tmp folders are clean. Thanks Michael :)
    0
  • cPanelMichael
    [quote="johnchristy, post: 1593262">Works great. Now my tmp folders are clean. Thanks Michael :)
    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.