0byt3m1n1
Path:
/
data
/
16
/
.snapshot
/
daily.2025-03-10_0010
/
ftplogs
/
[
Home
]
File: makeonedayftp2.pl
#!/usr/local/bin/perl #Get date using system call :-/ use Date::Calc qw(:all); ($dow, $month, $day, $time, $tzone, $year) = split /\s+/ ,`date`,6; chomp($year); $month = Decode_Month($month); ($year, $month, $day) = Add_Delta_YMD($year, $month, $day, 0, 0, -2); $month = (substr((Month_to_Text($month)),0,3)); $grepable = $day; $grepable = " $grepable" if ($grepable < 10); #Done with arduous date game #Build the one day log file. $host = `hostname`; chomp($host); `tail -400000 /data/16/ftplogs/logs/${host}.vsftpd.log | grep "$month $grepable" > /data/16/ftplogs/$host.$month$day`; #One day log file. Need to build check for 00:00 to 23:59 at a later time.