Solved

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

Posted on 2010-11-08
4
382 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

757 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

16 Experts available now in Live!

Get 1:1 Help Now