|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Simple Cron job
I need delete all dir in client_download create or modified more than 5 minutes ago
I use this cron : find /home/mysite/public_html/client_download -type d -cmin +5 -exec rm -f {} \; But Cron send me the message : rm: cannot remove `/home/mysite/public_html/client_download': Is a directory rm: cannot remove `/home/flextic/public_html/mysite/7pN4VU9qlf1jSdFdtWy8': Is a directory rm: cannot remove `/home/flextic/public_html/mysite/XSZ31ZS82E': Is a directory ??? |
|
#2
|
|||
|
|||
|
Change this:
rm -f to rm -rf Hope this helps. |
|
#3
|
|||
|
|||
|
Quote:
perfectbut .. why this ? thks a lot |
|
#4
|
|||
|
|||
|
because "rm" doesn't remove directories by default... check out "man rm"
![]() hth, M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#5
|
|||
|
|||
new problem the final is this find /home/mysite/public_html/client_download/ -type d -cmin +20 -exec rm -rf {} \; but the cron must delete dir client_download I must delete only dir "inside" client download why ? |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Simple Cron job |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|