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.

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:
    6
    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?
     
  2. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    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:
    6
    cheers i\'ll try that

    [quote:1919f50f1b]Try this: 0 0 * * * find /tmp -name * -atime 1 -exec rm -rf {} \\; [/quote:1919f50f1b]
     
Loading...

Share This Page