Sponsored Content
Operating Systems Linux Simplified find command to find multiple file types Post 302425434 by vickramshetty on Friday 28th of May 2010 01:19:40 AM
Old 05-28-2010
Simplified find command to find multiple file types

Hi,

I'm using the following command to find the multiple requierd file types and its working fine

Code:
 
find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f

Though above command workswell and good, but the command is lengthier and difficult to edit or parameterize.
I'm looking to simplify it so that it can be easily editable in a script in future .
Please help me if anyone could simplify the problem.

Note : I cant use "*.*" as its gonna search all the files.

Thanks
Vikram shetty
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find multiple file types and tar

There are these ksh files and config files that are written and updated on a daily basis. All I want to do is write a script that finds both these types of files and archive them on a daily basis, to help in restoring in times of system outages and so on. Particulary I'm interested in .ksh ,... (9 Replies)
Discussion started by: manthasirisha
9 Replies

2. UNIX for Dummies Questions & Answers

how to find a file named vijay in a directory using find command

I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem. so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies

3. Shell Programming and Scripting

I need to find one command from multiple files and need to print that file which contains neede com

Hi all i need your help .. I am having a multiple file in directory and i have find out the Rcopy word from these files and need to print those files which contains the Rcopy word Thanks and regards Vijay sahu (2 Replies)
Discussion started by: vijays3
2 Replies

4. Shell Programming and Scripting

How to pass multiple file types search pattern as argument to find?

How can I pass $var_find variable as argment to find command? test.sh var_find=' \( -name "*.xml" -o -name "*.jsp" \) ' echo "${var_find}" find . -type f ${var_find} -print # Below statement works fine.. I want to replace this with the above.. #find . \( -name "*.xml" -o -name... (4 Replies)
Discussion started by: kchinnam
4 Replies

5. UNIX for Dummies Questions & Answers

grep command to find multiple strings in multiple lines in a file.

I want to search files (basically .cc files) in /xx folder and subfolders. Those files (*.cc files) must contain #include "header.h" AND x() function. I am writing it another way to make it clear, I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies

6. Shell Programming and Scripting

How to use grep & find command to find references to a particular file

Hi all , I'm new to unix I have a checked project , there exists a file called xxx.config . now my task is to find all the files in the checked out project which references to this xxx.config file. how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies

7. Shell Programming and Scripting

Find multiple string in one file using find command

Hi, I want find multiple string in one file using find coomand. And keeping it in one variable.grep is not working. (5 Replies)
Discussion started by: vivek1489
5 Replies

8. Shell Programming and Scripting

bash: find multiple types[solved]

Hi, I would like to use find to search for multiple types. For example search for symlink and regular file but not directories, sockets etc.... Something like: find . -type l,f -name "stuff" But of course it does not work. Is there any way to avoid an if statement and to do it faster? ... (0 Replies)
Discussion started by: Dedalus
0 Replies

9. Shell Programming and Scripting

Using a single "find" cmd to search for multiple file types and output individual files

Hi All, I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd. What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
Discussion started by: swaters
3 Replies

10. UNIX for Beginners Questions & Answers

Script to find file types and info

I'm looking for a way to inventory files on a webserver into a CSV file, and am particularly interested in certain types of files, like .php, .cgi, .pl, .py, .sh, etc. but also want the ability to find all files, including those with no extension, or specified extensions, as above, including files... (1 Reply)
Discussion started by: spacegoose
1 Replies
JH_MANIFEST(1)							    Javahelper							    JH_MANIFEST(1)

NAME
jh_manifest - Adds or/and modifies manifests for jars SYNOPSIS
jh_manifest [debhelperoptions] [options] jar1 ... jarN jh_manifest [debhelperoptions] [options] DESCRIPTION
Javahelper tool to add or update manifests in a jar file. It can be used in two modes. If passed jar files, it will only process these jar files. Otherwise it will update all jar files in the packages it acts on. When processing a package, the debhelper(7) exclude option will make jh_manifest ignore matching jar files. FILES
debian/package.manifest (or debian/manifest) This file consist of a list of jar files and values to add to their manifests. Values in this file will take precedence over values in the original manifest (and command line arguments over values in this file). It is allowed to list a link in this file instead of an actual jar file, provided that the link can be resolved when jh_manifest processes it. If a jar file is listed here cannot be found, jh_manifest will print a warning, unless the jar file has been excluded. As of javahelper >= 0.32, you may add comments in this file. If the line starts with a "#" it is completely ignored. This file is ignored if jh_manifest is passed jar files via command line. OPTIONS
-c classpath, --classpath=classpath Sets the Class-Path attribute of all processed jar files to classpath. If not passed, then the CLASSPATH environment variable will be used in the given jar file do not have a Class-Path attribute. -m class, --main=class Sets the Main-Class attribute to class in all processed jar files. -o options, --javaopts=options Sets the Debian-Java-Parameters to options in all processed jar files. This attribute is used by jarwrapper to start java with extra options (e.g. to make more memory available). -j /path/to/java/home, --java-home=/path/to/java/home Sets the Debian-Java-Home attribute to /path/to/java/home in all processed jars. This attribute is used by jarwrapper to determine which JVM to use. EXAMPLES
An example debian/manifest file: # use the symlink so we do not have to update with the next upstream release. usr/share/java/my.jar: Class-Path: dep1.jar dep2.jar Main-Class: some.awesome.Class usr/share/java/dep2.jar: Class-Path: dep1.jar SEE ALSO
debhelper(7) This program is a part of javahelper and uses debhelper as backend. There are also tutorials in /usr/share/doc/javahelper. AUTHOR
Niels Thykier <niels@thykier.net> COPYRIGHT AND LICENSE
Copyright 2010 by Niels Thykier This tool is free software; you may redistribute it and/or modify it under the terms of GNU GPL 2. 0.43 2012-03-12 JH_MANIFEST(1)
All times are GMT -4. The time now is 03:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy