On Sun, Apr 02, 2023 at 10:39:00AM +0200, Kusalananda Kähäri wrote: > On Sat, Apr 01, 2023 at 08:18:56AM +0200, Solène Rapenne wrote: > > Le Fri, 31 Mar 2023 19:40:45 -0700, > > Jared Harper <ja...@hrpr.us> a écrit : > > > > > I have put together a patch that adds -executable, -readable, and > > > -writable to /usr/bin/find. > > > > > > When I first started working on this patch, I implemented the access > > > check by checking the stat of the file like so: > > > > > > > this doesn't add much value IMO, we already have -perm that can be used > > to return paths matching the permission, or only a bit. > > > > find . -executable can be written find . -type f -perm -100 > > find . -writable can be written find . -type f -perm -200 > > find . -readable can be written find . -type f -perm -400 > > > > on linux, those flags make sense to have because they also take care of > > ACLs, while their -perm doesn't. OpenBSD doesn't have ACLs. > > > Note that e.g. -executable tests whether the current item is readable
s/readable/executable duh -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .