Detecting an executable efficiently is not simple: https://stackoverflow.com/questions/4458120/search-for-executable-files-using-find-command fd uses the executable bit of the file permissions, which should be mentioned in the help page.