04-18-2016
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: sharpsharkrocks
3 Replies
2. Shell Programming and Scripting
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)
Discussion started by: deepthi.s
3 Replies
3. Shell Programming and Scripting
Hello all,
I'm trying to determine when the last time a file in a certain directory was modified. I don't care what file it is, I just want to know when it was last updated. So far I have
ls -aRl --full-time --sort=time
which is close. The problem is that it only sorts within folders, not... (2 Replies)
Discussion started by: lokisapocalypse
2 Replies
4. Shell Programming and Scripting
Hi,
find . | xargs -s 47518 can list all the files and directories recursively , is there any possibility to copy only files from directories and subdirectoreis once it is listed. Please help
Thans & Regards
Uma (3 Replies)
Discussion started by: umapearl
3 Replies
5. Shell Programming and Scripting
I have a script which generates recursively some files in folders for a given root folder.
I have checks for permissions and it works for all folders except one(i have 777 permission on it). When i try calling the script in problematic folder(problematic folder being root folder), script works as... (2 Replies)
Discussion started by: bb2
2 Replies
6. UNIX for Dummies Questions & Answers
Hello!
I know what i s recursion, but can't imagine what shoudl be "recursicve copying" of files?
Please, what should mean:
cp -r /home/hope/files/* /home/hope/backup
Can someone helpme with a simple example?
Many thanks!!! (6 Replies)
Discussion started by: pinklemon
6 Replies
7. UNIX for Dummies Questions & Answers
Very new to shell scripting. Not sure if my title is correct but I will try and explain.
Directory has 100+ files with this format, " ABCD_ABC_Abc_AB0126.abc ". When a new file gets created, the 16-19 characters in the file name gets incremented by 1. Ex...todays most recent file is... (14 Replies)
Discussion started by: askvip
14 Replies
8. Shell Programming and Scripting
I'm using cygwin32 on Windows.
DN is an environment variable pointed at my download directory.
This command works to move the single most recent file in my download directory to my current directory:
mv "`perl -e '$p = $ARGV; opendir $h, $p or die "cannot opendir $p: $!"; @f = sort { -M $a... (2 Replies)
Discussion started by: siegfried
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: apacheLinux
4 Replies
10. Shell Programming and Scripting
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
perl::critic::policy::modules::requireexplicitpackage
Perl::Critic::Policy::Modules::RequireExplicitPackage(3)User Contributed Perl DocumentatioPerl::Critic::Policy::Modules::RequireExplicitPackage(3)
NAME
Perl::Critic::Policy::Modules::RequireExplicitPackage - Always make the "package" explicit.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
In general, the first statement of any Perl module or library should be a "package" statement. Otherwise, all the code that comes before
the "package" statement is getting executed in the caller's package, and you have no idea who that is. Good encapsulation and common
decency require your module to keep its innards to itself.
There are some valid reasons for not having a "package" statement at all. But make sure you understand them before assuming that you
should do it too.
The maximum number of violations per document for this policy defaults to 1.
CONFIGURATION
As for programs, most people understand that the default package is "main", so this Policy doesn't apply to files that begin with a perl
shebang. If you want to require an explicit "package" declaration in all files, including programs, then add the following to your
.perlcriticrc file
[Modules::RequireExplicitPackage]
exempt_scripts = 0
Some users may find it desirable to exempt the load of specific modules from this policy. For example, Perl does not support Unicode module
names because of portability problems. Users who are not concerned about this and intend to use "UTF-8" module names will need to specify
"use utf8;" before the package declaration. To do this, add the following to your .perlcriticrc file
[Modules::RequireExplicitPackage]
allow_import_of = utf8
The "allow_import_of" configuration option takes multiple module names, separated by spaces.
IMPORTANT CHANGES
This policy was formerly called "ProhibitUnpackagedCode" which sounded a bit odd. If you get lots of "Cannot load policy module" errors,
then you probably need to change "ProhibitUnpackagedCode" to "RequireExplicitPackage" in your .perlcriticrc file.
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::Modules::RequireExplicitPackage(3)