#!/usr/bin/perl chdir('/home/archive/logs/old'); @FileNum = system("ls -t -al") ; chomp($month = 'date +"%b" --date "7 day ago"'); chomp($date = 'date +"%d" --date "7 day ago"'); foreach (@FileNum) { if /how do I compar the date?? here { system(" rm $_"); } };
In reply to Re: del files that is 7 days or older
by dvergin
in thread del files that is 7 days or older
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |