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

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.