11-05-2012
If available - you don't mention your system details - grep's -r option will descend into directories by itself.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all experts,
here is a problem which i would appreciate ur expertise.
I need to do this:
Eg.
Find a number: 1234567 which i dunno which file and which folder
I do know which main folder it is in but it is hidden deep within a lot of subdir.
Is it possible to find the file? + output... (4 Replies)
Discussion started by: unnerdy
4 Replies
2. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
3. UNIX Desktop Questions & Answers
hi friens, :)
if i need to find files with extension .c++,.C++,.cpp,.Cpp,.CPp,.cPP,.CpP,.cpP,.c,.C
wat is the pattern for finding them
:confused: (2 Replies)
Discussion started by: arunsubbhian
2 Replies
4. Shell Programming and Scripting
I have a list of urls for example:
Google
Google Base
Yahoo!
Yahoo!
Yahoo! Video - It's On
Google
The problem is that Google and Google are duplicates as are Yahoo! and Yahoo!.
I'm needing to find these conical www duplicates and append the text "DUP#" in from of both Google and... (3 Replies)
Discussion started by: totus
3 Replies
5. Shell Programming and Scripting
This is regarding using awk tool to find lines matching between 2 patterns.
cat file | awk '/pat1/,/pat2/'
But it's not working as expected in the following case.
If pat1 also comes after pat2 then it's matching whole file after pat1.
e.g.
# > cat -n file
1 First line... (3 Replies)
Discussion started by: anand_bh
3 Replies
6. Shell Programming and Scripting
Hi,
I have a file with 3 columns and I want to find when the average number of rows on column 3 is a certain value. The output will be put into another file indicating the range.
Here is what I mean (file is tab separated):
hhm1 2 0
hhm1 4 0.5
hhm1 6 0.3
hhm1 8 -1.4... (2 Replies)
Discussion started by: kylle345
2 Replies
7. Shell Programming and Scripting
I an trying to parse a file looking for pattern1, or pattern2, or pattern3 and when found print that line and the next 4 lines after it. I am using korn shell script on AIX and grep -A isn't available. (1 Reply)
Discussion started by: daveisme
1 Replies
8. Shell Programming and Scripting
Hi,
I have a master file that i need to split into multiple files based on matched patterns. sample of my data as follows:-
scaff_1 a e 123 130 c_scaff_100
scaff_1 a e 132 138 c_scaff_101
scaff_1 a e 140 150 ... (2 Replies)
Discussion started by: redse171
2 Replies
9. Shell Programming and Scripting
Hi,
I have requirement to find the matching patterns of two files in Unix. One file is the log file and the other is the error list file. If any pattern in the log file matches the list of errors in the error list file, then I would need to find the counts of the match.
For example,
... (5 Replies)
Discussion started by: Bobby_2000
5 Replies
10. Shell Programming and Scripting
Hello.
For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)
Discussion started by: jcdole
2 Replies
LEARN ABOUT NETBSD
locate.conf
LOCATE.CONF(5) BSD File Formats Manual LOCATE.CONF(5)
NAME
locate.conf -- locate database configuration file
DESCRIPTION
The locate.conf file specifies the behavior of locate.updatedb(8), which creates the locate(1) database.
The locate.conf file contains a list of newline separated records, each of which is composed of a keyword and arguments, which are separated
by white space. Arguments with embedded shell metacharacters must be quoted in sh(1) style. Lines beginning with ``#'' are treated as com-
ments and ignored. However, a ``#'' in the middle of a line does not start a comment.
The configuration options are as follows:
ignore pattern ...
Ignore files or directories. When building the database, do not descend into files or directories which match one of the specified
patterns. The matched files or directories are not stored to the database.
Default: Not specified.
ignorecontents pattern ...
Ignore contents of directories. When building the database, do not descend into files or directories which match one of the speci-
fied patterns. The matched files or directories themselves are stored to the database.
Default: Not specified.
ignorefs type ...
Ignore file system by type, adding type to the default list. When building the database, do not descend into file systems which are
of the specified type. The mount points are not stored to the database. If a ``!'' is prepended to type, the meaning is negated,
that is, ignore file systems which do not have the type. As a special case, if ``none'' is specified for type, the ignorefs list is
cleared and all file systems are traversed.
type is used as an argument to find(1) -fstype. The sysctl(8) command can be used to find out the types of file systems that are
available on the system:
sysctl vfs.generic.fstypes
Default: !local cd9660 fdesc kernfs procfs
searchpath directory ...
Specify base directories to be put in the database.
Default: /
workdir directory
Specify the working directory of locate.updatedb, in which a temporary file is placed. The temporary file is a list of all files,
and you should specify a directory that has enough space to hold it.
Default: /tmp
Refer to find(1) for the details of pattern (see -path expression) and type (see -fstype expression).
FILES
/etc/locate.conf The file locate.conf resides in /etc.
SEE ALSO
find(1), locate(1), locate.updatedb(8), sysctl(8)
HISTORY
The locate.conf file format first appeared in NetBSD 2.0.
AUTHORS
ITOH Yasufumi
BSD
July 10, 2011 BSD