[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] help - making a cron job to auto delete files, earlier than a specific date



At 11:11 AM 8/10/01 +1000, Tim Lawson wrote:
>I just changed the last line to read...
>find /home/sites/www.domain.com.au/web/pdf -type f -ctime +15 | xargs rm
>*.pdf
>
>Assuming I put the correct 'www.domain.com.au' in the line instead, this
>should delete all the files ending in '.pdf' if older than 15 days???

I would try it as:

find /home/sites/www.domain.com.au/web/pdf/*.pdf -type f -ctime +15 | xargs rm

I think the way you had it would remove ALL your PDFs. :( Make sure you
backup your files before trying it.

--------------------------------------------------------------------------
Ted Behling, Web Application Developer - Monarch Information Systems, Inc.

43 Folly Field Road, Unit 4, Hilton Head Island, SC 29928-5434
E-mail: mailto:TBehling@xxxxxxxxxxxxx
Phone/Fax: 1-800-842-7894    Local or Outside the USA: 1-843-842-7894
Cell Phone (urgent issues): 843-816-7895
Cell Phone E-mail: mailto:TedPhone@xxxxxxxxxxxxx (116 letter limit)
Web site: http://www.MonarchIS.net
--------------------------------------------------------------------------