I was trying the following "find" command to search for a particular file in UNIX directories:
find / -name <filename> -print
Result on the screen appears like:
find: cannot open <..>
..permission denied
Is there any way, I could avoid these type of search results and only see the... (2 Replies)
Hi,
Is there any function in Unix by which v can find the exact day of any given date. Like i need to get Wednesday if i give 05 07 2008 (format MM DD YYYY)
Thanks,
RRVARMA (5 Replies)
hi,
i am a newbie and have to write a rather complicated script. Assume that i have a variable called x and a C source code file say file1.c (these are the inputs of the script) and i need to find the names of all the functions in the C file containing x.Take the following code as an example:
... (2 Replies)
Hi,
Im using a find function to find a specific file and print it.
eg.
find /path -name filename -type f -print -exec more '{}' \;
The problem I have is that I need to know if the file has not been fount (ie it does not exist).
I had a look at the find function and could not find anything... (4 Replies)
I have an error in my logs as it shows some function name .
1. I dnt know where is the file.cpp located only i know the machine .
2. How to find out that the function name is loacated in which path and which file into that machine.
Thanks . (1 Reply)
Hello All,
Is there any way to find a function name in a program file using perl.
for example, there is a file called Test.C in that
.
.
void function1(..)
{
<some code>
}
int function2(..)
{
.
.
sam() /*RA abc100*/
...
..
..
xyz()/*RA abc201*/
.. (8 Replies)
Hi,
I need to use a function in the find command to do some process on the file. I'm trying:
funcname(){ ... }
...
find ./ -name "*" -exec funcname {} \;
But somehow this is not working. I don't want to have a separate script for whatever processing the function does. I want to have... (1 Reply)
Hi,
There is requirement where I need to search if a particular directory name is present or not and if its present I need to collate the paths of the directories in a file.
I tried the below command
echo $(find /home/mqm -name "check")>>config.txt
Its saving the paths in one line(like... (7 Replies)
Hi everybody,
I want your help on what, I suppose, might seem a simple task to many of you.
the deal is to write a script that will look in a specific folder to see if there is any file whose size is bigger than say 1M and if so to execute a command.
like
if
then
log_rotate
fi
... (3 Replies)
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
LEARN ABOUT DEBIAN
file::find::rule::procedural
File::Find::Rule::Procedural(3pm) User Contributed Perl Documentation File::Find::Rule::Procedural(3pm)NAME
File::Find::Rule::Procedural - File::Find::Rule's procedural interface
SYNOPSIS
use File::Find::Rule;
# find all .pm files, procedurally
my @files = find(file => name => '*.pm', in => @INC);
DESCRIPTION
In addition to the regular object-oriented interface, File::Find::Rule provides two subroutines for you to use.
"find( @clauses )"
"rule( @clauses )"
"find" and "rule" can be used to invoke any methods available to the OO version. "rule" is a synonym for "find"
Passing more than one value to a clause is done with an anonymous array:
my $finder = find( name => [ '*.mp3', '*.ogg' ] );
"find" and "rule" both return a File::Find::Rule instance, unless one of the arguments is "in", in which case it returns a list of things
that match the rule.
my @files = find( name => [ '*.mp3', '*.ogg' ], in => $ENV{HOME} );
Please note that "in" will be the last clause evaluated, and so this code will search for mp3s regardless of size.
my @files = find( name => '*.mp3', in => $ENV{HOME}, size => '<2k' );
^
|
Clause processing stopped here ------/
It is also possible to invert a single rule by prefixing it with "!" like so:
# large files that aren't videos
my @files = find( file =>
'!name' => [ '*.avi', '*.mov' ],
size => '>20M',
in => $ENV{HOME} );
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
Copyright (C) 2003 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Find::Rule
perl v5.12.4 2011-09-19 File::Find::Rule::Procedural(3pm)