![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| delete all but one files in a directory | finalight | Shell Programming and Scripting | 10 | 05-21-2008 03:51 AM |
| How to Delete Multi Directory and Files | cthinh | UNIX for Dummies Questions & Answers | 5 | 05-08-2008 04:03 AM |
| Is there anyway to delete a directory that has more than 200mil files? | plcyber | UNIX for Advanced & Expert Users | 4 | 06-01-2007 04:28 PM |
| Delete Some Old files from Particular Directory | siva80_cit | Shell Programming and Scripting | 2 | 12-11-2006 06:47 AM |
| delete files in specific directory | legato | Shell Programming and Scripting | 2 | 03-29-2006 09:46 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
CRON. How to delete files within a directory
I'd like to delete ALL files on a daily basis within a directory that are over a day old. Anyone know how I can automate this through Cron as I have 146 websites to administer.
I've tried... 30 02 * * * /home/myspace/tmp/webalizer -atime + 1\! -type d -exec rm -f {} \; but all i get is an email telling me that it is a directory... Subject: Cron <myspace@neptune> /home/myspace/tmp/webalizer -atime + 1\! -type d -exec rm -f {} \; /bin/sh: line 1: /home/myspace/tmp/webalizer: is a directory |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|