Hmm, that looks like a nice optimization. Bob, what do you think?

-s (suppresses the output of fuser)

O.

On Mon, May 16, 2011 at 15:52, Marcus Cobden
<[email protected]> wrote:
> Here's (what I hope is) a small optimisation to Bob's solution.
>
> * fuser returns non-zero if the files aren't in use
> * since we only need the argument once, we probably don't need a shell
>
> Can you guys check this over for me?
>
> find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f \
>        -cmin +$(/usr/lib/php5/maxlifetime) \
>        ! -execdir fuser -s {} \; \
>        -delete
>
>
>
>
> _______________________________________________
> pkg-php-maint mailing list
> [email protected]
> http://lists.alioth.debian.org/mailman/listinfo/pkg-php-maint
>



-- 
Ondřej Surý <[email protected]>
http://blog.rfc1925.org/



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to