• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

Find all the executable files in unix inside the directory and all sub directories

I need to Find all the executable files in unix inside the directory and all sub directories
0
sobeservices2
Asked:
sobeservices2
  • 3
1 Solution
 
sobeservices2Author Commented:
Oh I then need to find the unique file names

0
 
sobeservices2Author Commented:
I was able to figure out ls -RF will give me the executable  that are denoted by a star.

Then I need to take the ones denoted by a star out and list them
how would I do this in a script

0
 
sobeservices2Author Commented:
OK I figured the whole thing out on my own here is my solution

ls -iRF fileLab
ls -iRF fileLab | grep '*'
ls -iRF fileLab | grep '*' | sort -u
ls -iRF fileLab | grep '*' | sort -unk 1
ls -iRF fileLab | grep '*' | sort -unk 1 | awk '{print $2}' 
ls -iRF fileLab | grep '*' | sort -unk 1 | awk '{print $2}' |sort -u
ls -iRF fileLab | grep '*' | sort -unk 1 | awk '{print $2}' |sort -u | tr -d '*'

Open in new window

0
 
TintinCommented:
The more standard way of doing this is

find  fileLab -type f -perm /111 | awk -F/ '{print $NF}' | sort -u
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now