in reply to Re: command using system
in thread command using system

what if I am deleting directories as well ?

Replies are listed 'Best First'.
Re: Re: Re: command using system
by Zaxo (Archbishop) on Feb 02, 2004 at 22:05 UTC

    rmdir, after emptying.

    After Compline,
    Zaxo

Re: Re: Re: command using system
by ysth (Canon) on Feb 02, 2004 at 22:02 UTC
    I suspect you want a second pass to remove empty directories (or after the unlink, check if that was the last file in the directory and unlink it). I very much doubt you want to remove directories with a modification time < 30 days ago, since they could very well have files with more recent modification dates.