find . -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \)
funcionou para mim. alguma outra solução?
exemplo
-rwxr--r-- 1 me users 0 May 27 13:58 file_0
-rw-rwxrw- 1 me users 0 May 27 13:58 file_1
-rw-rw-rwx 1 me users 0 May 27 13:59 file_2
-rwxrwxrwx 1 me users 0 May 27 14:02 file_3
Eu precisaria listar todos os 4 arquivos no diretório atual
find . -type f -perm +111
De find(1)
:
-perm [-|+]mode
The mode may be either symbolic (see
chmod(1)
) or an octal number. If the mode is symbolic, a starting value of zero is assumed and the mode sets or clears permissions without regard to the process’ file mode creation mask. If the mode is octal, only bits 07777 (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO
) of the file’s mode bits participate in the comparison. If the mode is preceded by a dash ("-
"), this primary evaluates to true if at least all of the bits in the mode are set in the file’s mode bits. If the mode is preceded by a plus ("+
"), this primary evaluates to true if any of the bits in the mode are set in the file’s mode bits. Otherwise, this primary evaluates to true if the bits in the mode exactly match the file’s mode bits. Note, the first character of a symbolic mode may not be a dash ("-
").
Não especificado no SUSv3, mas portátil pelo * BSD e Linux pelo menos (eu não testei outros).
Bem, se você gosta de dispositivos Rube Goldberg , você pode usar:
ls -l | grep '^[^d]\(..x\|.\{5\}x\|.\{8\}x\)' | awk '{ print $8 }'
Embora isso apenas liste o diretório atual.