Cron help - please

Hi Guys,

Feeling little frustrated, therefore I can really use your help in getting a cronjob working. I have a Hsphere reseller account under which I am running a FTP server on a Linux account.

Here are the requirements:
Under ftp root I have the Dir A, Dir B, Dir C…….
I want to delete any files/sub-sirectories that are older than 14 days. Please keep in mind that I want all the files and sub-directories under the Dir A, Dir B, Dir C……. deleted but even if they are empty not the Dir A, Dir B, Dir C themselves ( in other words I need the rm to skip one level).

I have this cron command below that worked fine on my old hosting provider but it is not working on Jodohost. I keep on getting a find error (find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]).

find . -depth +1 -mtime +14 -exec rm -rf {} \;

Thanks in advance.

Sam
 
Instead of a '.' mention the full path to the directory when you need this operation to be executed.
 
Back
Top