Solved

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

Posted on 2010-11-08
4
384 Views
Last Modified: 2012-05-10
I need to Find all the executable files in unix inside the directory and all sub directories
0
Comment
Question by:sobeservices2
  • 3
4 Comments
 

Author Comment

by:sobeservices2
ID: 34089556
Oh I then need to find the unique file names

0
 

Author Comment

by:sobeservices2
ID: 34089561
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
 

Accepted Solution

by:
sobeservices2 earned 0 total points
ID: 34089655
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
 
LVL 48

Expert Comment

by:Tintin
ID: 34090753
The more standard way of doing this is

find  fileLab -type f -perm /111 | awk -F/ '{print $NF}' | sort -u
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now