1

I want to write a script to find all executable files under a specific directory which I want to pass in parameter. I am able to find all executable files using a predefined directory but I want to be able to just pass a directory name and the script finds the directory in the file system and find all executable under it.

Can I do this with find command?

1 Answer 1

1

Yes find should be capable of that:

find /path/to/dir -type f -perm /ugo=x
2
  • Hi cYrus, thanks for the quick response. The problem is I dont have the path, I need to find the path to the directory name passed in command line
    – sab
    Sep 22, 2012 at 20:30
  • Can you elaborate? According to what criteria you need to find the path from another path passed as an argument? Let's say the input path is /foo/bar/ and then?
    – cYrus
    Sep 22, 2012 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .