On Thu, Dec 10, 2009 at 4:55 PM, Manvendra Bhangui <[email protected]> wrote:
> Also rm -rf can be replaced by
> find /var/lib/mod_tile/default -type f -exec rm -f {} \;
>
>
> The above find command avoids the use of wildcard and hence the error
> "argument list too long" can be avoided in case the directory gets filled up
> with thousands of files

This will be incredible slow because find will launch an rm
process for every single file which matches the search criteria.
Using xargs like this provides faster performance:
    find /some/path -type f -print0 | xargs -0 rm


But another problem the OP will face with this command
is that it will only delete files and leave empty directories
behind.



IMO, running rm directly would be the best option.


KG: for an extra level of security, you can set file permissions
to ensure that only these files can be deleted by the cron script
and no other data can be touched.


- Raja
_______________________________________________
To unsubscribe, email [email protected] with 
&quot;unsubscribe &lt;password&gt; &lt;address&gt;&quot;
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to