Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

331
Views
How can I find all non-executable files in a directory in Linux?

What option should be used in find command in Linux for listing non executable file in directory?

9 months ago · Santiago Trujillo
1 answers
Answer question

0

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
9 months ago · Santiago Trujillo Report
Answer question
Find remote jobs