Re: find(1) with -delete ignores -maxdepth

2023-08-29 Thread Andreas Kusalananda Kähäri
On Tue, Aug 29, 2023 at 09:41:34AM +0200, Marcus MERIGHI wrote: > Hello, > > thanks for taking a look! My reproducer is at the end. > > What I missed to state: this is on amd64, > OpenBSD 7.3-current (GENERIC.MP) #1356: Mon Aug 28 09:35:30 MDT 2023 > > kern...@gmail.com (George Koehler),

Re: find(1) with -delete ignores -maxdepth

2023-08-29 Thread Marcus MERIGHI
Hello, thanks for taking a look! My reproducer is at the end. What I missed to state: this is on amd64, OpenBSD 7.3-current (GENERIC.MP) #1356: Mon Aug 28 09:35:30 MDT 2023 kern...@gmail.com (George Koehler), 2023.08.28 (Mon) 22:01 (CEST): > On Mon, 28 Aug 2023 12:42:39 +0200 > Marcus MERIGHI

Re: find(1) with -delete ignores -maxdepth

2023-08-28 Thread George Koehler
On Mon, 28 Aug 2023 12:42:39 +0200 Marcus MERIGHI wrote: > My complete crontab(5) entry reads: > > /usr/bin/find ~/ -maxdepth 1 -fstype local -name "*.core" -delete > > Now I get error messages saying "Access Denied" for directories that > find(1) should not access due to "-maxdepth 1". I

find(1) with -delete ignores -maxdepth

2023-08-28 Thread Marcus MERIGHI
Hallo, a recent post on misc@ mentioned the following crontab(5) command to remove core files: @reboot /usr/bin/find ~ -fstype local -name '*.core' -delete ( https://marc.info/?l=openbsd-misc=169303728425504 ) I wondered why I did not use the "-delete" primary but the "-print0 | xargs -0"