Sponsored Content
Full Discussion: Find Command
Homework and Emergencies Emergency UNIX and Linux Support Find Command Post 302430046 by venkidhadha on Wednesday 16th of June 2010 11:55:43 AM
Old 06-16-2010
Find Command

Hello I need to search for pattern in my direcotry which are not of format *.out.

I tried using ! for the not option.

The below command of mine did not work.

find . -name \!*.out -print

I also used the -not option for this and it too did not work.

find . -not \(-name *.out\) -print

Can anyone let me know of how I would use the not condition for displaying the files in my directory which are not of the format *.out


Thanks in advance for your help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command find returned bash: /usr/bin/find: Argument list too long

Hello, I create a file touch 1201093003 fichcomp and inside a repertory (which hava a lot of files) I want to list all files created before this file : find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies

2. Shell Programming and Scripting

Little bit weired : Find files in UNIX w/o using find or where command

Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same. Thanks in advance. Regards Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies

3. 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

4. Shell Programming and Scripting

find: No match due to find command being argument

I am using csh and getting the error "find: No match." but I cannot figure out why. What I am trying to do is set the find command to a variable and then execute the variable as a command. I ran it through a debugger and it looks like $FIND is getting set but the find command can not actually be... (2 Replies)
Discussion started by: mst3k4l
2 Replies

5. Linux

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 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... (2 Replies)
Discussion started by: vickramshetty
2 Replies

6. Shell Programming and Scripting

what is the find command to find exact dir from the root

I want to find a dir called STOP from the root.so what is the find command. Thanks & Regards Rajkumar (1 Reply)
Discussion started by: rajkumar_g
1 Replies

7. Shell Programming and Scripting

Find, regular expression, anyway to simplify this find command?

Hello everyone, first post here, trying to learn scripting on my own and this forum as been really helpful so far. I made few little scripts working great but I m facing some problems with RE. I have a bunch of files in many subdirectories called *001.ext *002.ext OR simple *.ext or *01.ext... (7 Replies)
Discussion started by: Sekullos
7 Replies

8. 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

9. 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

10. Solaris

Is it possible to find the seek rate of the find command in Solaris?

Hello, I am running some performance based tests on Solaris, and I was wondering how fast the "seeking" rate of Solaris is, or how fast Solaris can get information about files with the "find" command. Does anyone know what 'find' command I could run to traverse through my system to see the rate... (1 Reply)
Discussion started by: bstring
1 Replies
GLOBAL(1)						      General Commands Manual							 GLOBAL(1)

NAME
global - print the locations of specified object. SYNOPSIS
global [-aGilnqrstTvx][-e] pattern global -c[qrsv] prefix global -f[anqrstvx] files global -g[aGilnoOqtvx][-e] pattern global -I[ailnqtvx][-e] pattern global -P[aGilnoOqtvx][-e] pattern global -p[qrv] global -u[qv] DESCRIPTION
Global find the locations of specified object in C, C++, Yacc, Java, PHP and Assembly source files. Global can treat a source tree, that is, a directory that has sub-directories and source files as a project. You can get the relative path of objects from anywhere within the project. Global can locate not only object definitions but also object references and other symbols. In advance of using this command, you must execute gtags(1) at the root directory of the project to make tag files. Then you can execute this command at anywhere in the project. COMMANDS
The following commands are available: <no command> pattern Print object which match to the pattern. Extended regular expressions which are the same as those accepted by egrep(1) are avail- able. -c, --completion [prefix] Print the candidates of object names which start with the specified prefix. Prefix is not specified, print all object names. -f, --file files Print all tags in the files. This option implies the -x option. -g, --grep pattern Print all lines which match to the pattern. --help Show help. -I, --idutils pattern Print all lines which match to the pattern. This function use idutils(1) as a search engine. To use this command, you need to install idutils(1) in your system and you must execute gtags(1) with the -I option. -P, --path [pattern] Print the paths which match to the pattern. If no pattern specified, print all paths in the project. -p, --print-dbpath Print the location of 'GTAGS'. -u, --update Locate tag files and update them incrementally. --version Show version number. OPTIONS
The following options are available: -a, --absolute Print absolute path name. By default, print relative path name. --from-here context Decide tag type by the context. The context must be 'lineno:path'. If this option is specified then the -s and -r are ignored. Regular expression is not allowed in the pattern. This option is assumes use in conversational environments such as editors and IDEs. -e, --regexp pattern Use pattern as the pattern; useful to protect patterns beginning with '-'. -G, --basic-regexp Interpret pattern as a basic regular expression. The default is extended regular expression. -i, --ignore-case ignore case distinctions in pattern. -l, --local Print just objects which exist under the current directory. -n, --nofilter Suppress sort filter and path conversion filter. -O, --only-other Search pattern only in other than source files like 'README'. This option is valid only with -g or -P command. This option over- ride the -o option. -o, --other Search pattern in not only source files but also other files like 'README'. This option is valid only with -g or -P command. -q, --quiet Quiet mode. -r, --reference, --rootdir Print the locations of object references. By default, print object definitions. With the -p option, print the root directory of source tree. --result format format may be 'path', `ctags', `ctags-x', `grep' or 'cscope'. The --result=ctags and --result=ctags-x are equivalent to the -t and -x respectively. The --result option is given to priority more than the -t and -x option. -s, --symbol Print the locations of specified symbol other than definitions. -T, --through Go through all the tag files listed in GTAGSLIBPATH. By default, stop searching when tag is found. This option is ignored when either -s, -r or -l option is specified. -t, --tags Print with standard ctags format. -v, --verbose Verbose mode. -x, --cxref In addition to the default output, produce the line number and the line contents. EXAMPLES
$ ls -F Makefile src/ lib/ $ gtags $ global main src/main.c $ global -x main main 10 src/main.c main (argc, argv) { $ global -x '^[sg]et' set_num 20 lib/util.c set_num(values) get_num 30 lib/util.c get_num() { $ global -rx '^[sg]et' set_num 113 src/op.c set_num(32); set_num 225 src/opop.c if (set_num(0) > 0) { get_num 90 src/op.c while (get_num() > 0) { $ cd lib $ global -rx '^[sg]et' set_num 113 ../src/op.c set_num(32); set_num 225 ../src/opop.c if (set_num(0) > 0) { get_num 90 ../src/op.c while (get_num() > 0) { $ global strlen $ (cd /usr/src/sys; gtags) $ export GTAGSLIBPATH=/usr/src/sys $ global strlen ../../../usr/src/sys/libkern/strlen.c $ (cd /usr/src/lib; gtags) $ GTAGSLIBPATH=/usr/src/lib:/usr/src/sys $ global strlen ../../../usr/src/lib/libc/string/strlen.c FILES
'GTAGS' Tag file for object definitions. 'GRTAGS' Tag file for object references. 'GSYMS' Tag file for other symbols. 'GPATH' Tag file for path of source files. 'GTAGSROOT' If environment variable GTAGSROOT is not set and 'GTAGSROOT' exist in the same directory with 'GTAGS' then use the value as GTAGS- ROOT. '/etc/gtags.conf', '$HOME/.globalrc' Configuration file. ENVIRONMENT
The following environment variables affect the execution of global: GTAGSROOT The directory which is the root of source code. GTAGSDBPATH The directory on which gtags database exist. This value is ignored when GTAGSROOT is not defined. GTAGSLIBPATH If this variable is set, it is used as the path to search for library functions. If the specified function is not found in the source project, global also search in these paths. GTAGSLABEL If this variable is set, its value is used as the label of configuration file. The default is default. MAKEOBJDIRPREFIX If this variable is set, '$MAKEOBJDIRPREFIX<current directory>' is used as the candidate directory for tag files. CONFIGURATION
The following configuration variables affect the execution of global: icase_path(boolean) Ignore case distinctions in the pattern. DIAGNOSTICS
Global exits with a non 0 value if an error occurred, 0 otherwise. SEE ALSO
gtags-parser(1), gtags(1), htags(1), less(1). GNU GLOBAL source code tag system (http://www.gnu.org/software/global/). AUTHOR
Tama Communications Corporation. HISTORY
The global command appeared in FreeBSD 2.2.2. GNU Project March 2008 GLOBAL(1)
All times are GMT -4. The time now is 06:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy