Need to find recursively all shell script in the /xyz directory

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to find recursively all shell script in the /xyz directory
# 1  
Old 09-12-2011
Need to find recursively all shell script in the /xyz directory

Pls. advise how to find or used grep recursively all shell script files.

Some files doesnt have a .sh or .ksh extension name.
find / -name "*" |xargs grep bin |grep sh



Last edited by Franklin52; 09-13-2011 at 04:14 AM.. Reason: Please use code tags for code and data samples, thank you
# 2  
Old 09-12-2011
find /xyz | xargs file | grep shell

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find Large Files Recursively From Specific Directory

Hi. I found many scripts in the web of achieving this. But I like to use this one find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command? My... (7 Replies)
Discussion started by: aimy
7 Replies

2. Shell Programming and Scripting

Shell script to find if any new entry in directory

I require a shell script to find if any new entry of dump files present in a particular directory and to send an email if any new entry exists.I had a crontab to run the script for every 5 min. Below are the file (9 Replies)
Discussion started by: bhas85
9 Replies

3. Shell Programming and Scripting

Shell script to find the GB files in /tmp directory in remote server

Hi, i need help on shell scripting. Main intention of the script is step 1: ssh to remote server Step 2: cd /tmp in remote server Step 3: in tmp i want to grep only files and directories which are in GB sizes All the servers list file is - tmpsrv.txt vi tmpsrv.txt ... (17 Replies)
Discussion started by: kumar85shiv
17 Replies

4. Shell Programming and Scripting

Shell script to find weblogic home directory

Hi, I am trying to find the weblogic home directory whether it is installed in the Linux box. if it is existing display the weblogic home and the corresponding Java home directory else display message as that wl home does not exist. I already wrote a program but it was not working properly.... (11 Replies)
Discussion started by: spgreddy
11 Replies

5. Shell Programming and Scripting

Find every directory named XYZ under the DVLP directory

I only want to find files under each branch of the directory tree inside directories named XYZ and there are multiple XYZ directories? (7 Replies)
Discussion started by: emc^24sho
7 Replies

6. Shell Programming and Scripting

[Solved] How to match xyz-mno-prq in shell script?

I want to match variable with Point codes. $Input == xyz-mno-pqr x,y,z,m,n,o,p,q,r are numbers from 0 to 9. It may or may not be there eg 207-89-67 027-089-067 207-9-7 25-98-1 Like these inputs. How to match these ? (2 Replies)
Discussion started by: Raza Ali
2 Replies

7. Shell Programming and Scripting

Shell script to find and replace contents of files in directory

Hi all This is my first post. Please bear with me with all my mistakes. I started learning shell since couple of days now and this might be quite basic for all, i want to search for files in a directory containing specific string and replace it with new string. The code i wrote is quite bulky... (2 Replies)
Discussion started by: theprogrammer
2 Replies

8. Shell Programming and Scripting

how to find a pattern from an external file in a directory containing multiple file recursively

Hi, Need your help in this. I have an input file that has multiple enrollment_number, somewhat like 1234567 8901234 9856321 6732187 7623465 Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Discussion started by: mukulverma2408
10 Replies

9. Shell Programming and Scripting

Problem with script generating files in directory recursively

I have a script which generates recursively some files in folders for a given root folder. I have checks for permissions and it works for all folders except one(i have 777 permission on it). When i try calling the script in problematic folder(problematic folder being root folder), script works as... (2 Replies)
Discussion started by: bb2
2 Replies

10. Shell Programming and Scripting

Shell Script - find, recursively, all files that are duplicated

Hi. I have a problem that i can't seem to resolve. I need to create a script that list all the files, that are found recursively, with the same name. For example if a file exists in more than one directory with the same name it list all the files that he founds with all the info. Could someone... (5 Replies)
Discussion started by: KitFisto
5 Replies
Login or Register to Ask a Question