Sponsored Content
Top Forums Shell Programming and Scripting Find directories only and delete them created 3 days before Post 302439835 by siba.s.nayak on Saturday 24th of July 2010 05:34:28 AM
Old 07-24-2010
Hi Jmathew99,

Could you please explain why have u used -mtime here? I don't see any use of it here. And also I don't think u need to put -name wthin braces.

Thanks
 

10 More Discussions You Might Find Interesting

1. HP-UX

Command for delete the directories which are older than 7 days

Hi, My requirement is need to delete the directories (Including files also) which are older than 7 days. So I used below command in one script (script takes 2 input parameters) #$1 - Path of the directory from where we have to delete the directories.# #$2 - Number of days older... (1 Reply)
Discussion started by: sridhar sivakot
1 Replies

2. Shell Programming and Scripting

Delete files from sub-directories over 7 days

Can any one please help me in deleting all the Files over 7 days from sub-directories A, B, C... Top-Directory Sub-Directory-A File-1 File-2 ..... File-n Sub-Directory-B File-1 File-2 ..... File-n Sub-Directory-C File-1 ... (1 Reply)
Discussion started by: sureshcisco
1 Replies

3. Red Hat

Find files older than 30 days in directories and delete them

Hi, I have dummies questions: My script here can find the files in any directories older than 30 days then it will delete the files but not the directories. I would like to also be able to delete the directories that hold old files more than 30 days not just the files itself. find . -type f... (2 Replies)
Discussion started by: lamoul
2 Replies

4. Shell Programming and Scripting

Using cron to delete directories 90 days old

We use Solaris 10 x86 and I want to use a cron job to remove directories +90 old. Currently I have the command below but it only cleans the files and keeps the directory. What am I doing wrong? /opt/tesk/batch/kit/archive/* -mtime +90 -exec rm -r {} \: Thank you (3 Replies)
Discussion started by: oh-daa
3 Replies

5. Shell Programming and Scripting

Find the directory modified/created before 4 days

Hi, I have an application which creates some directories while running. I want to delete these directories which are 4 days older. i tried find . type d -mtime +1 -print And it is working fine.. but find . type d -mtime +4 -print is not giving any results which are 4 days... (6 Replies)
Discussion started by: Tuxidow
6 Replies

6. UNIX for Dummies Questions & Answers

How to find files created some days before?

HI, I have 2 questions. 1> Is there any code to see files that created some day or some time before in a directory??? 2> how or where i will find the last exit status of a process?? thanks (6 Replies)
Discussion started by: jyotidas
6 Replies

7. Shell Programming and Scripting

Find unix file created how many days ago?

i want to find unix file created how many days ago? (4 Replies)
Discussion started by: utoptas
4 Replies

8. Shell Programming and Scripting

what is the find to command to find the files created last 30 days

what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies

9. Shell Programming and Scripting

Find directories that are not used for 500 days

How to list the directories that are not acessed for more than 500 days? i used find in the following way find . -type d -atime +500 -exec du -sh {} \; but it is listing all the sub direcories of the parent directories which satisfy above condiion.I would like to get just name of the... (1 Reply)
Discussion started by: sajuatl
1 Replies

10. Shell Programming and Scripting

Find the sum of files created 5 days before

Hi, I want to find the sum of all the files created 5 days ago and store it in a variable. (os is HP-UX) can this be extracted from ls -l Is there any other way of getting the sum of all the files created (4 Replies)
Discussion started by: bang_dba
4 Replies
Perl::Critic::Policy::Modules::ProhibitEvilModules(3pm) User Contributed Perl DocumentationPerl::Critic::Policy::Modules::ProhibitEvilModules(3pm)

NAME
Perl::Critic::Policy::Modules::ProhibitEvilModules - Ban modules that aren't blessed by your shop. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Use this policy if you wish to prohibit the use of specific modules. These may be modules that you feel are deprecated, buggy, unsupported, insecure, or just don't like. CONFIGURATION
The set of prohibited modules is configurable via the "modules" and "modules_file" options. The value of "modules" should be a string of space-delimited, fully qualified module names and/or regular expressions. An example of prohibiting two specific modules in a .perlcriticrc file: [Modules::ProhibitEvilModules] modules = Getopt::Std Autoload Regular expressions are identified by values beginning and ending with slashes. Any module with a name that matches "m/pattern/" will be forbidden. For example: [Modules::ProhibitEvilModules] modules = /Acme::/ would cause all modules that match "m/Acme::/" to be forbidden. In addition, you can override the default message ("Prohibited module "module" used") with your own, in order to give suggestions for alternative action. To do so, put your message in curly braces after the module name or regular expression. Like this: [Modules::ProhibitEvilModules] modules = Fatal {Found use of Fatal. Use autodie instead} /Acme::/ {We don't use joke modules} Similarly, the "modules_file" option gives the name of a file containing specifications for prohibited modules. Only one module specification is allowed per line and comments start with an octothorp and run to end of line; no curly braces are necessary for delimiting messages: Evil # Prohibit the "Evil" module and use the default message. # Prohibit the "Fatal" module and give a replacement message. Fatal Found use of Fatal. Use autodie instead. # Use a regular expression. /Acme::/ We don't use joke modules. By default, the modules that have been deprecated by the Perl 5 Porters are reported; at the time of writing these are Class::ISA, Pod::Plainer, Shell, and Switch. Specifying a value for the "modules" option will override this. NOTES
Note that this policy doesn't apply to pragmas. 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.14.2 2012-06-07 Perl::Critic::Policy::Modules::ProhibitEvilModules(3pm)
All times are GMT -4. The time now is 09:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy