Hi
I am a shell-script newbie and am looking to synchronize certain files in two directory structures.
Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over.
I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Dear All,
Appreciate some help here.
I have a log of report. It located in several directory as below:
Directory:
mysscpr1
mysscpr2
mysscpr3
my_scnpr4
In the directory it contain hundred of files.
i need to find a specific files that contain 'invc2345' in the directory.
How... (7 Replies)
I have to write a shell script which can delete all the files and directories recursively inside the specified directory but should not delete the specified directory.
Please some body help me in writing the script. (3 Replies)
I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find )
The directory structure looks like :-
/tmp
a.log
b.log
c.log
/abcd
d.log
e.log
When I tried the following command , it movies all the log files... (8 Replies)
Hi All,
I have searched this forum for related posts but could not find one that fits mine. I have a shell script which removes all the XML tags including the text inside the tags from some 4 million XML files.
The shell script looks like this (MODIFIED):
find . "*.xml" -print | while read... (6 Replies)
Pls. advise how to find or used grep recursively all shell script files.
Some files doesnt have a .sh or .ksh extension name.
find / -name "*" |xargs grep bin |grep sh
??
TIA (1 Reply)
Hi,
Is there a way to find all the files from a specific location and then zip them into a single file, even if they are in multiple directories? (3 Replies)
Hi,
I have to find specific files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..
I am using the below command. And i am... (2 Replies)
Is it possible to only copy selected files+its directories when you are copying recursively?
find /OriginalFolder/* -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \; -print
From the above line, I want to only copy *txt and *ini files from /OriginalFolder/*
... (4 Replies)
I need to copy a complete directory structure into a new location. But I want to have all files copied into one directory and leave out the directory structure. So all files must be placed in one directory. (4 Replies)
Discussion started by: ReneVL
4 Replies
LEARN ABOUT CENTOS
file::find::rule::perl
File::Find::Rule::Perl(3) User Contributed Perl Documentation File::Find::Rule::Perl(3)NAME
File::Find::Rule::Perl - Common rules for searching for Perl things
SYNOPSIS
use File::Find::Rule ();
use File::Find::Rule::Perl ();
# Find all Perl files smaller than 10k
my @files = File::Find::Rule->perl_file
->size('<10Ki')
->in('dir');
# Locate all the modules that PAUSE will index
my @mod = File::Find::Rule->no_index
->perl_module
->in('My-Distribution');
DESCRIPTION
I write a lot of things that muck with Perl files. And it always annoyed me that finding "perl files" requires a moderately complex
File::Find::Rule pattern.
File::Find::Rule::Perl provides methods for finding various types Perl-related files, or replicating search queries run on a distribution
in various parts of the CPAN ecosystem.
METHODS
perl_module
The "perl_module" rule locates perl modules. That is, files that are named "*.pm".
This rule is equivalent to "->"file->name( '*.pm' )> and is included primarily for completeness.
perl_test
The "perl_test" rule locates perl test scripts. That is, files that are named "*.t".
This rule is equivalent to "->"file->name( '*.t' )> and is included primarily for completeness.
perl_installer
The "perl_installer" rule locates perl distribution installers. That is, it locates "Makefile.PL" and "Build.PL" files.
perl_script
The "perl_script" rule locates perl scripts.
This is any file that ends in .pl, or any files without extensions that have a perl "hash-bang" line.
perl_file
The "perl_file" rule locates all files containing Perl code.
This includes all the files matching the above "perl_module", "perl_test", "perl_installer" and "perl_script" rules.
no_index
# Provide the rules directly
$rule->no_index(
directory => [ 'inc', 't', 'examples' ],
file => [ 'Foo.pm', 'lib/Foo.pm' ],
);
# Provide a META.yml to use
$rule->no_index( 'META.yml' );
# Provide a dist root directory to look for a META.yml in
$rule->no_index( 'My-Distribution' );
# Automatically pick up a META.yml from the target directory
$rule->no_index->in( 'My-Distribution' );
The "no_index" method applies a set of rules as per the no_index section in a "META.yml" file.
SUPPORT
Bugs should always be submitted via the CPAN bug tracker
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-Perl>
For other issues, contact the maintainer
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
<http://ali.as/>, File::Find::Rule, File::Find::Rule::PPI
COPYRIGHT
Copyright 2006 - 2012 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.3 2012-10-31 File::Find::Rule::Perl(3)