Sponsored Content
Top Forums Shell Programming and Scripting Script for parsing directories one level and finding directories older than n days Post 302347741 by zaxxon on Wednesday 26th of August 2009 09:54:41 AM
Old 08-26-2009
Check the man page for find. Have a look at the option -mtime. Test it out and if you get stuck at a particular thing, ask again.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to remove files older than 30 days except directories

Hi, I need to remove files (*.trc) which are older than 30 days from one location. My problem is there I do not want to visit any of the directories at that location. I want to search files at that particular location only (need to skip directorys at that location). maxdepth option is there... (6 Replies)
Discussion started by: malaymaru
6 Replies

2. 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

3. Shell Programming and Scripting

Finding cumulative size of files older than certain days

Hi All, I've got a ton of files in a particular directory. I want to find pdf files older than 30 days in that directory and then the cumulative size of those files. Ex: find /home/jk/a -name "*.pdf" -mtime +30 consider it finds the below 4 files. /home/jk/a/1.pdf /home/jk/a/2.pdf... (1 Reply)
Discussion started by: rohan076
1 Replies

4. 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

5. Shell Programming and Scripting

Finding directories older than 5 days

Hello, Motive: Search all directories which are older than 5 days. Example: consider following directory structure: abc/dir1 abc/dir1/dir abc/dir2 abc/dir3 abc/dir3/temp Suppose dir1 and dir3 are 5 days older. Then I am looking for a command which lists abc/dir1 and abic/dir3 only so that... (4 Replies)
Discussion started by: mytempid07
4 Replies

6. UNIX for Advanced & Expert Users

How to Remove 180 days older non-empty directories

Hi Gurus, I have command to delete more than 180days file. find /home/abc/ -name "CBST_*.txt*" -mtime +180 | xargs -n 100 rm -f Now I would like to delete more than 180days Non empty directory--What will be command? Following is non empty directory as instance CBST2010* (2 Replies)
Discussion started by: thepurple
2 Replies

7. Shell Programming and Scripting

Perl script for finding directories with mtime

Need assistance in the perl script . Below script gives me the results of all the files and directories with mtime with no issues . But i wanted to have a file and specify all the directory locations and use that file as reference and get results . Any ideas are highly Appreciated . ... (6 Replies)
Discussion started by: ajayram_arya
6 Replies

8. UNIX for Dummies Questions & Answers

How to compress the directories which is older than 7 days?

Hi all, how to compress the directories which is older 7 days. If any one knows please help me this is urgent. Thanks in advance (3 Replies)
Discussion started by: rameshpagadala
3 Replies

9. Shell Programming and Scripting

Need Help in ksh Script to list files older than 365 days from specified directories

Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file. so 1 script should only list files older than 365 days for each directory separately to a folder The other script should read these files... (7 Replies)
Discussion started by: prasadn
7 Replies

10. Linux

Finding files older than x days within directory with spaces

Hi, I am trying to run a command that finds all files over x amount of days, issue is one of the directories has spaces within it. find /files/target directory/*/* -type f -mtime +60 When running the above the usual error message is thrown back + find '/files/target\' 'directory/*/*' -type... (1 Reply)
Discussion started by: Ads89
1 Replies
Test::RDF(3pm)						User Contributed Perl Documentation					    Test::RDF(3pm)

NAME
Test::RDF - Test RDF data for content, validity and equality, etc. VERSION
Version 0.26 SYNOPSIS
use Test::RDF; is_valid_rdf($rdf_string, $syntax, 'RDF string is valid according to selected syntax'); is_rdf($rdf_string, $syntax1, $expected_rdf_string, $syntax2, 'The two strings have the same triples'); isomorph_graphs($model, $expected_model, 'The two models have the same triples'); are_subgraphs($model1, $model2, 'Model 1 is a subgraph of model 2' ); has_uri($uri_string, $model, 'Has correct URI'); hasnt_uri($uri_string, $model, "Hasn't correct URI"); has_subject($uri_string, $model, 'Subject URI is found'); has_predicate($uri_string, $model, 'Predicate URI is found'); has_object_uri($uri_string, $model, 'Object URI is found'); has_literal($string, $language, $datatype, $model, 'Literal is found'); pattern_target($model); pattern_ok($pattern, '$pattern found in $model'); EXPORT
is_valid_rdf Use to check if the input RDF string is valid in the chosen syntax is_rdf Use to check if the input RDF strings are isomorphic (i.e. the same). isomorph_graphs Use to check if the input RDF::Trine::Models have isomorphic graphs. are_subgraphs Use to check if the first RDF::Trine::Models is a subgraph of the second. has_subject Check if the string URI passed as first argument is a subject in any of the statements given in the model given as second argument. has_predicate Check if the string URI passed as first argument is a predicate in any of the statements given in the model given as second argument. has_object_uri Check if the string URI passed as first argument is a object in any of the statements given in the model given as second argument. has_literal Check if the string passed as first argument, with corresponding optional language and datatype as second and third respectively, is a literal in any of the statements given in the model given as fourth argument. language and datatype may not occur in the same statement, so the test fails if they are both set. If none are used, use "undef", like e.g. has_literal('A test', undef, undef, $model, 'Simple literal'); A test for a typed literal may be done like has_literal('42', undef, 'http://www.w3.org/2001/XMLSchema#integer', $model, 'Just an integer'); and a language literal like has_literal('This is a Another test', 'en', undef, $model, 'Language literal'); has_uri Check if the string URI passed as first argument is present in any of the statements given in the model given as second argument. hasnt_uri Check if the string URI passed as first argument is not present in any of the statements given in the model given as second argument. pattern_target Tests that the object passed as its parameter is an RDF::Trine::Model or RDF::Trine::Store. That is, tests that it is a valid thing to match basic graph patterns against. Additionally, this test establishes the target for future "pattern_ok" tests. pattern_ok Tests that the pattern passed matches against the target established by "pattern_target". The pattern may be passed as an RDF::Trine::Pattern, or a list of RDF::Trine::Statement objects. use Test::RDF; use RDF::Trine qw[iri literal blank variable statement]; use My::Module; my $foaf = RDF::Trine::Namespace->new('http://xmlns.com/foaf/0.1/'); pattern_target(My::Module->get_model); # check isa RDF::Trine::Model pattern_ok( statement( variable('who'), $foaf->name, literal('Kjetil Kjernsmo') ), statement( variable('who'), $foaf->page, iri('http://search.cpan.org/~kjetilk/') ), "Data contains Kjetil's details." ); Note: "pattern_target" must have been tested before any "pattern_ok" tests. NOTE
Graph isomorphism is a complex problem, so do not attempt to run the isomorphism tests on large datasets. For more information see <http://en.wikipedia.org/wiki/Graph_isomorphism_problem>. AUTHOR
Kjetil Kjernsmo, "<kjetilk at cpan.org>" BUGS
Please report any bugs using github <https://github.com/kjetilk/Test-RDF/issues> SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::RDF You may find the Perl and RDF community website <http://www.perlrdf.org/> useful. You can also look for information at: o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Test-RDF <http://annocpan.org/dist/Test-RDF> o CPAN Ratings http://cpanratings.perl.org/d/Test-RDF <http://cpanratings.perl.org/d/Test-RDF> o Search CPAN http://search.cpan.org/dist/Test-RDF/ <http://search.cpan.org/dist/Test-RDF/> o MetaCPAN <https://metacpan.org/module/Test::RDF> ACKNOWLEDGEMENTS
Michael Hendricks wrote the first Test::RDF. The present module is a complete rewrite from scratch using Gregory Todd William's RDF::Trine::Graph to do the heavy lifting. Toby Inkster has submitted the pattern_* functions. LICENSE AND COPYRIGHT
Copyright 2010 ABC Startsiden AS and 2010-2012 Kjetil Kjernsmo. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. perl v5.14.2 2012-06-10 Test::RDF(3pm)
All times are GMT -4. The time now is 10:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy