What option should be used in find
command in Linux for listing non executable file in directory?
About linux : How-can-I-find-all-non-executable-files-in-a-directory-in-Linux
Question Detail
Question Answer
Depends on your definition of executable, in this context.
If you mean files that you (current user) are allowed to execute, then you can use something like this (finds non-executable regular files; no directories)
find . -type f ! -executable
If instead, you mean files which have the +x
permission set (for their owner or group or everyone), then i believe you want something like this (finds regular files; no directories; which do not have u+x
, g+x
nor o+x
)
find . -type f ! -perm /0111