Sponsored Content
Homework and Emergencies Homework & Coursework Questions Archive and purge the log file Post 302821393 by Scott on Friday 14th of June 2013 01:00:50 PM
Old 06-14-2013
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read from file then purge or archive.

Hi All, I have a root directory /tmp and I want to purge files or archive files in its subsequent subfolders.I listed the path of files I want to purge(archive) and the #of days. (purge) DAYS PATH 7 /tmp/arsenal/* 5 /tmp/chelsea/* (archive? the same as above but different folders... (15 Replies)
Discussion started by: kayarsenal
15 Replies

2. Shell Programming and Scripting

Purge files based on timestamp avl in file name

Dear All, I have the followoing requirement.. REQ-1: Suppose I have the following files XX_20070202000101.zip XX_20080223000101.zip XX_20080226000101.zip XX_20080227000101.zip XX_20080228000101.zip XX_20080229000101.zip Suppose sysdate = 29 Feb 2007 I need to delete all files... (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

3. Shell Programming and Scripting

shell script for archive purge

I am writing a shell script for Archive Purge for the table having rows < 1 year. The shell script has to extract the rows from the table and write those extracted rows to a text file. Then from the text file, each rows will be read and deleted by means of delete query one by one. The fields will... (5 Replies)
Discussion started by: regnumber
5 Replies

4. Shell Programming and Scripting

script to archive and purge

Hi, I am writing a shell script for archive data from a table. The design is as follows. Step 1: Execute the select query and extract the data into a text file. Step 2: The primary key for this table is TRACKING_NUM, TRACKING_NUM_SUFFIX, TIMESTAMP_UPDATED. So These three fields will be read... (1 Reply)
Discussion started by: kmanivan82
1 Replies

5. Shell Programming and Scripting

Purge files and archive

Hi Friends, I have an urgent requirement. I have many files huge in size which has occupied almost the entire disk space. The files are not being moved to the archived folder. But at present I need to purge those files, new to shell scripting, not sure how to proceed. Eg. Directory... (3 Replies)
Discussion started by: unx100
3 Replies

6. Shell Programming and Scripting

moving log file into Archive directory

Hi All, I'm trying to write a script which will do following : - For any old log under trace directory, if found move it to Archive - Check for a process “process-A” if it is running abort from the script - Else start it up (start_process-A.sh this case) - If it fails to start the... (1 Reply)
Discussion started by: mohullah
1 Replies

7. Shell Programming and Scripting

Need a script or one-liner to purge lines from a file.

i all. This one sounds so simple, but I can't get it to work. I need to delete lines with certain keywords from a file. I have a file called defaultRules, with keywords: IPSEC_AH IKE_UDP IPMP_TEST_IFACE2 Then, I have another file called rules.txt with some rules: ... (10 Replies)
Discussion started by: BRH
10 Replies

8. UNIX for Advanced & Expert Users

Purge MAil file

Hi, merry christmas. on AIX 6.1, the file /var/spool/mail/user, should/can be purged manually ? Any commande line to purge it ? Thanks. (2 Replies)
Discussion started by: big123456
2 Replies

9. Shell Programming and Scripting

Create archive and nil the content of log file using script

Plese help I need a urgent requirement. Ex: test.log requirement : using shell script I need to archive the log file and nil and the content of (test.log) file to 0 kb and then in the archive folder log files are name to test.tar test1.tar test2.tar EX: /home/abc/ test.log ... (1 Reply)
Discussion started by: johney1981
1 Replies

10. Shell Programming and Scripting

Log archive

Hi, I am trying to move old file to archive folder. find /sourcedirectory/logs/* -type f -mtime +30 -exec mv "{}" /sourcedirectory/logs/archive \; The above command not only search for old file in /sourcedirectory/logs/ folder but also searchs in /sourcedirectory/logs/archive ( what... (3 Replies)
Discussion started by: lpprasad321
3 Replies
TAP::Harness::Archive(3pm)				User Contributed Perl Documentation				TAP::Harness::Archive(3pm)

NAME
TAP::Harness::Archive - Create an archive of TAP test results SYNOPSIS
use TAP::Harness::Archive; my $harness = TAP::Harness::Archive->new(\%args); $harness->runtests(@tests); DESCRIPTION
This module is a direct subclass of TAP::Harness and behaves in exactly the same way except for one detail. In addition to outputting a running progress of the tests and an ending summary it can also capture all of the raw TAP from the individual test files or streams into an archive file (".tar" or ".tar.gz"). METHODS
All methods are exactly the same as our base TAP::Harness except for the following. new In addition to the options that TAP::Harness allow to this method, we also allow the following: archive This is the name of the archive file to generate. We use Archive::Tar in the background so we only support ".tar" and ".tar.gz" archive file formats. This can optionally be an existing directory that will have the TAP archive's contents deposited therein without any file archiving (no Archive::Tar involved). extra_files This is an array reference to extra files that you want to include in the TAP archive but which are not TAP files themselves. This is useful if you want to include some log files that contain useful information about the test run. extra_properties This is a hash reference of extra properties that you've collected during your test run. Some things you might want to include are the Perl version, the system's architecture, the operating system, etc. runtests Takes the same arguments as TAP::Harness's version and returns the same thing (a TAP::Parser::Aggregator object). The only difference is that in addition to the normal test running and progress output we also create the TAP Archive when it's all done. aggregator_from_archive This class method will return a TAP::Parser::Aggregator object when given a TAP Archive to open and parse. It's pretty much the reverse of creating a TAP Archive from using "new" and "runtests". It takes a hash of arguments which are as follows: archive The path to the archive file. This can also be a directory if you created the archive as a directory. This is required. parser_callbacks This is a hash ref containing callbacks for the TAP::Parser objects that are created while parsing the TAP files. See the TAP::Parser documentation for details about these callbacks. made_parser_callback This callback is executed every time a new TAP::Parser object is created. It will be passed the new parser object, the name of the file to be parsed, and also the full (temporary) path of that file. meta_yaml_callback This is a subroutine that will be called if we find and parse a YAML file containing meta information about the test run in the archive. The structure of the YAML file will be passed in as an argument. my $aggregator = TAP::Harness::Archive->aggregator_from_archive( { archive => 'my_tests.tar.gz', parser_callbacks => { plan => sub { warn "Nice to see you plan ahead..." }, unknown => sub { warn "Your TAP is bad!" }, }, made_parser_callback => sub { my ($parser, $file, $full_path) = @_; warn "$file is temporarily located at $full_path "; } } ); AUTHOR
Michael Peters, "<mpeters at plusthree.com>" BUGS
Please report any bugs or feature requests to "bug-tap-harness-archive at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=TAP-Harness-Archive <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=TAP-Harness-Archive>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc TAP::Harness::Archive You can also look for information at: o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/TAP-Harness-Archive <http://annocpan.org/dist/TAP-Harness-Archive> o CPAN Ratings http://cpanratings.perl.org/d/TAP-Harness-Archive <http://cpanratings.perl.org/d/TAP-Harness-Archive> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=TAP-Harness-Archive <http://rt.cpan.org/NoAuth/Bugs.html?Dist=TAP-Harness-Archive> o Search CPAN http://search.cpan.org/dist/TAP-Harness-Archive <http://search.cpan.org/dist/TAP-Harness-Archive> ACKNOWLEDGEMENTS
o A big thanks to Plus Three, LP (<http://www.plusthree.com>) for sponsoring my work on this module and other open source pursuits. o Andy Armstrong COPYRIGHT &; LICENSE Copyright 2007 Michael Peters, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-09-04 TAP::Harness::Archive(3pm)
All times are GMT -4. The time now is 08:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy