Thread Files von sysdate -1 herausfinden (8 answers)
Opened by walu at 2012-10-25 15:30

Muffi
 2012-10-25 16:14
#162840 #162840
User since
2012-07-18
1465 Artikel
BenutzerIn
[default_avatar]
ungetestet in etwa so:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
use Class::Date 'date';

use constant CTIME => 10;

for my $filepath (glob('/foo/*')) {
    next if $filepath =~ /\.gz$/;
    next if date((stat($filepath))[CTIME])->truncate eq (date(time) - '1D')->truncate;

    print "$filepath\n";
}
1 + 1 = 10

View full thread Files von sysdate -1 herausfinden