We have log files dating back to 2004. I need to write an interative script that will request the user for how many months he needs to keep the log files and remove all the remaing log files after that month.
Supposing we are now in June 2006 , if teh user request to keep log file for the last 3... (1 Reply)
Hi All,
What i am looking for:
i want to generate a dynamic system time for each and every data(line) which goes on generating data continously....
now i am using this script to append a time for dynamic data generation log file,
tail -f filename_error.log|awk -v var="$( date... (2 Replies)
Hi,
I have a folder with limited space. I do not have provisions to increase the space for this folder.
So i have to delete files which are more than 1 month old automatically.
But, i need to maintain the files created by 4 users and delete all the other files automatically which is more than 1... (4 Replies)
Hi,
I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory.
So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically.
So my script should be like... (1 Reply)
i am a newbie and learning the ropes.........want to know how can i include a piece of code in a script (which redirects log files to a company standard out file) to delete the log files which are empty but should retain only those which has some process information in it......this should happen... (3 Replies)
Hi,
I have a folder with limited space. So i have to delete folder which are more than 5 days old automatically.
So my script should be like delete the folder more than 5 days old.
Can someone help me to generate a script for this.
Thank you...
Cheer
Summer (5 Replies)
Ok, so I just got charged with the task of deleting some 300 user folders in a FTP server to free up some space. I managed to grep and cut the list of user folders to delete into a list of one user folder per line.
Example:
bob00
jane01
sue03
In the home folder, there are folders a-z, and... (5 Replies)
I saw many post about this but could not find a specific answer to this question.
i have the following code
find . -depth -name "$FILEEXT" -ctime -30 -exec rm {} \;
when i type ./deletefiles.sh *.txt for example, it will find all the txt files less than 30 days old and delete them.
my... (9 Replies)
All printers are created on the PROD server and my script must pick up the differences in a diffs.txt file
delete the printer if exist on the DEV server
recreate it as it currently stands on the PROD server from the diffs.txt
The following script I have, should allow me in synching the local... (0 Replies)
Discussion started by: ggoliath
0 Replies
LEARN ABOUT MOJAVE
apache::testhandler
Apache::TestHandler(3) User Contributed Perl Documentation Apache::TestHandler(3)NAME
Apache::TestHandler - a few response handlers and helpers
SYNOPSIS
package My::Test;
use Apache::TestHandler ();
sub handler {
my ($r) = @_;
my $result = do_my_test;
Apache::TestHandler::ok1 $r, $result;
}
sub handler2 {
my ($r) = @_;
my $result = do_my_test;
Apache::TestHandler::ok $r, $result;
}
DESCRIPTION
"Apache::TestHandler" provides 2 very simple response handler.
FUNCTIONS
ok $r, $boolean
The handler simply prints out "ok" or "not ok" depending on the optional $boolean parameter.
If $boolean is omitted "true" is assumed.
ok1 $r, $boolean
This handler implements a simple response-only test. It can be used on its own to check if for a certain URI the response phase is
reached. Or it can be called like a normal function to print out the test result. The client side is automatically created as described
in <http://perl.apache.org/docs/general/testing/testing.html#Developing_Response_only_Part_of_a_Test>.
$boolean is optional. If omitted "true" is assumed.
same_interp_counter
same_interp_fixup
TODO
SEE ALSO
The Apache-Test tutorial: <http://perl.apache.org/docs/general/testing/testing.html>.
Apache::Test.
AUTHOR
Doug MacEachern, Geoffrey Young, Stas Bekman, Torsten Foertsch and others.
Questions can be asked at the test-dev <at> httpd.apache.org list For more information see: http://httpd.apache.org/test/.
perl v5.18.2 2015-06-18 Apache::TestHandler(3)