Re: [hackers] [PATCH 2/2] scripts: Fix non-portable find -perm /mode

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Sun, 29 Oct 2023 15:32:15 +0100

> Hi Quentin,

Hola Randy,

> > -find . ! -name . -prune -type f -perm /111 |
> > +find . ! -name . -prune -type f \( -perm -u+x -o -perm -g+x -o -perm o+x \) |
>
> I believe `-perm -111` is equivalent and specified by POSIX.

Not exactly, -perm -111 matches if at least the mode has executable bit
for all (could be 751 for example),
while GNU -perm /111 matches if any bit is set (could be 500).

I guess that the original intent of the code here
was to to find any executable file.
Received on Sun Oct 29 2023 - 15:32:15 CET

This archive was generated by hypermail 2.3.0 : Sun Oct 29 2023 - 15:36:37 CET