Find all Executable Files in a Directory via Linux Shell

Today, we’ll show how to find files marked as executable (chmod +x) in a given directory of a linux system.

Basic syntax

find {directory} -type f -executable

Common Examples

Find all executables in current directory recursively:

find . -type f -executable

Find all executables in current directory while skipping subdirectories:

find .  -maxdepth 1 -type f -executable

Find all executables on the system (recursively):

find / -type f -executable

Linux Shell / Bash Scripting, Tutorials | Posted on July 3, 2013 by .

About Kristijan Burnik

Kristijan Burnik is a Programmer and Web Developer specializing in Server-side and Client-side Technologies and Application Development on Linux Servers and Windows Desktop . Also has experience in Networking, Desktop application development as well as Android mobile application development . Experienced in Programming Languages like Java, C, C++, C#, PHP, Javascript, MySQL and somewhat in other languages like Bash, Perl & Python. Sometimes he works as a Graphical Designer for digital production as well as for printing and advertising. He dedicates his spare time writing Tech Articles on his blog in order to share his work with others, as well as to document his projects for his own use. He's also an Educator & Mentor in field of Algorithms and Programming to young programmers in Zagreb, Croatia.

Leave a Reply