06-10-2008
Thanks for your reply.
As you know, simple find by default recrusive option is true. As you quoted, i tried -maxdepth, how ever it's not working with my OS.
PFB details, (am using SunOS 5.9)
> find . -name "Rajini*" -maxdepth 1
find: bad option -maxdepth
find: path-list predicate-list
Is there any other apart from -maxdepth?
Waiting for your valuable reply
Thanks,
Naga
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories.
Any ideas? I am on DEC Unix :-( (3 Replies)
Discussion started by: christallott
3 Replies
2. UNIX for Dummies Questions & Answers
Hello, I am trying to search a directory for all files matching "G*" without looking in sub-directories "success" and "error". I've searched this forum and found the following syntax, but can't make it work:
find . \( ! -name success -prune -name error -prune \) -type f -name "G*"
Have... (6 Replies)
Discussion started by: alexkav
6 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone,
I'm using a recursive find (you know the type, find . -name qwert*) to find a set of files. However, because I'm new to the system and there is not much documentation about these particular files I'm trying to find them using this recursive find.
I started off at the location... (3 Replies)
Discussion started by: spanish_tony
3 Replies
4. Shell Programming and Scripting
I HAVE A TEXT FILE CONTAINING THE VALUES
1.CPP
2.CPP
3.CPP
4.CPP
5.CPP
6.CPP
I WANT TO TAKE EACH .CPP AND USE THE FIND COMMAND TO FIND THE LATEST VERSION OF THE FOLDER IN WHICH IT IS PRESENT.
HOW DO I IMPLEMENT IT IN A WHILE LOOP
I TRIED SOMETHING LIKE THIS
WHILE
CAT... (3 Replies)
Discussion started by: ultimatix
3 Replies
5. Shell Programming and Scripting
find -type d -name "TC_*" | sort
That's what I have so far... it finds the appropriate directories and then sorts them. But, when it comes to nested subdirectories, it only sorts relative to the first subdirectory. I want it to sort based on the directory at the end of the path. Does anyone know... (3 Replies)
Discussion started by: crimsondarkn
3 Replies
6. UNIX for Advanced & Expert Users
I was working on a shell script and found that the find command took too long, especially when I had to execute it multiple times. After some thought and research I came up with two functions.
fileScan()
filescan will cd into a directory and perform any operations you would like from within... (8 Replies)
Discussion started by: newreverie
8 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I am currently writing a find-and-remove kind of script that is to be used for Solaris and Linux.
Currently am using the find command below that I is in find only current directory (universal) | commandlinefu.com
This however gives me the "ksh: /bin/find: arg list too long" error... (6 Replies)
Discussion started by: newbie_01
6 Replies
8. UNIX for Dummies Questions & Answers
Hello Unix Gurus,
I am using the following find commands:
1)
find Input_Path -name '*.' -exec mv -f
{} Outputpath \;
2)
find Inputpath -name '*.' -exec cp
{} Outputpath \;
3)
find Somepath -name '*.'
Now the problem is my Unix version does not support maxdepth Option for find... (7 Replies)
Discussion started by: pchegoor
7 Replies
9. UNIX for Dummies Questions & Answers
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?
Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies
10. UNIX for Dummies Questions & Answers
Hi All
I have a requirement to find the file that are most latest to be modified in each directory. Can somebody help with the command please?
E.g of the problem.
The directory A is having sub directory which are having subdirectory an so on.
I need a command which will find the... (2 Replies)
Discussion started by: sudeep.id
2 Replies
LEARN ABOUT DEBIAN
debug::trace
Trace(3pm) User Contributed Perl Documentation Trace(3pm)
NAME
Debug::Trace - Perl extension to trace subroutine calls
SYNOPSIS
perl -MDebug::Trace=foo,bar yourprogram.pl
DESCRIPTION
Debug::Trace instruments subroutines to provide tracing information upon every call and return.
Using Debug::Trace does not require any changes to your sources. Most often, it will be used from the command line:
perl -MDebug::Trace=foo,bar yourprogram.pl
This will have your subroutines foo() and bar() printing call and return information.
Subroutine names may be fully qualified to denote subroutines in other packages than the default main::.
By default, the trace information is output using the standard warn() function.
MODIFIERS
Modifiers can be inserted in the list of subroutines to change the default behavior of this module. All modifiers can be used in three
ways:
o ":"name to enable a specific feature.
o ":no"name to disable a specific feature.
o ":"name"("value")" to set a feature to a specific value. In general, ":"name is equivalent to ":"name"(1)", while ":no"name corresponds
to ":"name"(0)".
The following modifiers are recognized:
:warn
Uses warn() to produce the trace output (default). ":nowarn" Sends trace output directly to STDERR.
:caller
Add basic call information to the trace message, including from where the routine was called, and by whom. This is enabled by default.
:stacktrace
Add a stack trace (call history).
:maxlen(length)
Truncate the length of the lines of trace information to length characters.
The following modifiers can be used to control the way Data::Dumper prints the values of parameters and return values. See also
Data::Dumper.
:indent
Controls the style of indentation. It can be set to 0, 1, 2 or 3. Style 0 spews output without any newlines, indentation, or spaces
between list items. :indent(0) is the default.
:useqq
When enabled, uses double quotes for representing string values. Whitespace other than space will be represented as "[
]",
"unsafe" characters will be backslashed, and unprintable characters will be output as quoted octal integers. This is the default, use
":nouseqq" to disable.
:maxdepth(depth)
Can be set to a positive integer that specifies the depth beyond which which we don't print structure contents. The default is 2, which
means one level of array/hashes in argument lists and return values is expanded. If you use ":nomaxdepth" or :maxdepth(0), nested
structures are fully expanded.
:quotekeys
Controls wether hash keys are always printed quoted. The default is ":noquotekeys".
sortkeys
Controls whether hash keys are dumped in sorted order. The default is ":nosortkeys".
Modifiers apply only to the subroutines that follow in the list of arguments.
METHODS
None, actually. Everything is handled by the module's import.
ENVIRONMENT VARIABLES
Environment variable "PERL5DEBUGTRACE" can be used to preset initial modifiers, e.g.:
export PERL5DEBUGTRACE=":warn:indent(2):nomaxdepth:quotekeys"
SEE ALSO
Data::Dumper, Carp
AUTHOR
Jan-Pieter Cornet <jpc@cpan.org>; Jos Boumans <kane@cpan.org>; Johan Vromans <jv@cpan.org>;
This is an Amsterdam.pm production. See http://amsterdam.pm.org.
COPYRIGHT
Copyright 2002 Amsterdam.pm. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.8.8 2005-06-12 Trace(3pm)