07-21-2008
thanks for the reply...
thanks for the reply...
but here is what i get when i use maxdepth
find . -maxdepth 1 -name *.zip -size 0c
find: bad option -maxdepth
find: path-list predicate-list
10 More Discussions You Might Find Interesting
1. Programming
I was hoping to get some assistance with this C program I am working on. The goal is to find the largest file in the current directory and then display this filename along with the filesize. What I have so far will display all the files in the current directory. But, how do I deal with "grabbing"... (1 Reply)
Discussion started by: AusTex
1 Replies
2. Shell Programming and Scripting
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)
Discussion started by: krishmaths
4 Replies
3. Shell Programming and Scripting
Hi,
I have a very urgent requirement here. I have to find all files in the specified directory but not in the sub directories(The directory name is stored in a variable) which are older than the current date as well as current time and rename it as filename_yyyymmddhhmmss.ext and move it into a... (7 Replies)
Discussion started by: ragavhere
7 Replies
4. Shell Programming and Scripting
Hi All
I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age.
I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies
5. Shell Programming and Scripting
Hello,
Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories.
The files names don't follow any defined rule, so they can be just letters without (.) period
Directory structure example: ... (0 Replies)
Discussion started by: Peter321
0 Replies
6. Shell Programming and Scripting
I am trying to use a loop to strip of the funny character ^M at the end of all lines in each file found in current directory and I have used the following in a script:
find . -type f -name '*.txt' | while read file
do
echo "stripping ^M from ..."
ex - "$file" > $tempfile
%s/^M//g
wq!
# mv... (4 Replies)
Discussion started by: bisip99
4 Replies
7. Shell Programming and Scripting
Hello all,
I am having a hard type in figuring out how to only gather certain files in the current directory without exploring its subdirectories.
I tried:
find . -name "*.ksh" -prune
this also returns ksh files from lower subdirectories.
I also tried
find . -ls -name "*.ksh"
This also... (8 Replies)
Discussion started by: gio001
8 Replies
8. Shell Programming and Scripting
we were asked to make a program that deletes all zero-byte files in a psecified directory. we need to use sysytem_calls like: scandir(),chdir(),stat() and remove(). (3 Replies)
Discussion started by: sogetsu009
3 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to find 4 latest files inside one folder having following File Name pattern and store them into 4 different variables and then use for processing in my shell script. File name is fixed length.
1) Each file starts with = ABCJmdmfbsjop letters + 7 Digit Number... (6 Replies)
Discussion started by: lancesunny
6 Replies
10. UNIX for Advanced & Expert Users
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 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)