Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cronjob on tmp files

Discussion in 'General Discussion' started by carpman, Oct 24, 2001.

  1. carpman

    carpman Active Member

    Joined:
    Sep 12, 2001
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    306
    I, like many, keep finding my small tmp dir getting full. I have tried a cronjob to remove all files older then 1 day by editing crontab with:

    0 0 * * * find /tmp -name * -atime 1 -exec rm -rf \"{}\";

    but i now get the following error mesage emailed to me, and the files are not deleted.

    find: paths must precede expression
    Usage: find [path...] [expression]

    anyone Ideas?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    316
    Try this: 0 0 * * * find /tmp -name * -atime 1 -exec rm -rf {} \\;
     
  3. carpman

    carpman Active Member

    Joined:
    Sep 12, 2001
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    306
    cheers i\'ll try that

    [quote:1919f50f1b]Try this: 0 0 * * * find /tmp -name * -atime 1 -exec rm -rf {} \\; [/quote:1919f50f1b]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice