RE: [PBML] Get all files in directory that are more than 7 days old
- On Aug 31, Priss said:
>> Shouldn't that be testing for the full pathThere's a big difference between
>> ("$dir/$file") to the file?
>For some reason, it didn't like:
>if (-M $dir/$file > $days)
One is a string of $dir, "/", and $file. The other is the division of the
value of $dir by the value of $file.
Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
- Well, you could do with a Unix find command...
find . -mtime +7
Or, in perl, you could do it...
perl -e 'print -M "/etc/passwd"'
The '-M' file test operator returns the number of days (to 13 decimal
places, in 5.8.0) since the file was modified. See also '-A' and '-C'.
31/08/2002 08:14 PM
Please respond to perl-beginner
Subject: [PBML] Get all files in directory that are more than 7 days old
Is there a way to get those files in a directory that
are more than 7 days old? (last modified is more than
a week ago)
Many thanks in advance...
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
Unsubscribing info is here:
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
This email contains confidential information intended only for the person named above and may be subject to legal privilege. If you are not the intended recipient, any disclosure, copying or use of this information is prohibited. The Department provides no guarantee that this communication is free of virus or that it has not been intercepted or interfered with. If you have received this email in error or have any other concerns regarding its transmission, please notify Postmaster@...