Comment 29 for bug 357024

Revision history for this message
Stephane Chazelas (stephane-chazelas) wrote : Re: [Bug 357024] Re: security hole in /etc/cron.daily/apport

2009-04-22 10:13:36 -0000, Martin Pitt:
> Marcus Meissner [2009-04-22 9:55 -0000]:
> > The patches not for "trunk" look good to me, the patch "patch for trunk"
> > should get -maxdepth too.
>
> Getting rid of the GNU-only -maxdepth was part of the exercise. It
> behaves like -maxdepth 1 now, due to the pruning.

More exactly,

find . ! -name . -prune ...

Is the standard/portable equivalent of GNU's

gfind . -mindepth 1 -maxdepth 1

The standard equivalent of gfind -maxdepth 1 would be:

find . \( -name . -o -prune \) ...

[...]
> cd /var/crash &&
> find . ! -name . -prune -type f \( -mtime +7 -o -size 0 \) -exec rm -f {} +
[...]

Best regards,
Stephane