SetSize - Perl extension for reducing files from the top down
use File::SetSize;
A very simple module to keep a file at set size by removing lines from the start of the file until the file is at the desired size. Ment created for apache logs.
usage
$file_name = "/usr/local/apache/logs/access_log"; $keepatsize = 500; # in bytes
SetSize($file_name,$keepatsize);
campbell paterson cam8chris@fastmail.com.au
perl(1).
To install File::SetSize, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::SetSize
CPAN shell
perl -MCPAN -e shell install File::SetSize
For more information on module installation, please visit the detailed CPAN module installation guide.