-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgo_clean.pl
executable file
·25 lines (18 loc) · 1.05 KB
/
go_clean.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl
############################################################################################
#### Name: go_clean.pl ####
#### Version: 2.0 ####
#### Copyright: GOAutoDial Inc. - Januarius Manipol <[email protected]> ####
#### License: AGPLv2 ####
############################################################################################
use POSIX qw/strftime/;
my $gologspath = '/var/log/goautodial';
my $filename = strftime('%d-%b-%Y-%H:%M',localtime);
#print strftime('%D %T',localtime); ## outputs 12/17/08 10:08:35
#print strftime('%d-%b-%Y-%H:%M',localtime); ## outputs 17-Dec-2008-10:08
#print $filename;
`cp $gologspath/goautodiald.log $gologspath/goautodiald.log.$filename`;
`cp $gologspath/nohup.log $gologspath/nohup.log.$filename`;
`echo "" > $gologspath/goautodiald.log`;
`echo "" > $gologspath/nohup.log`;
quit;