?
Solved

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

Posted on 2010-11-08
4
Medium Priority
?
390 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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