in reply to How to determine the last modified date for a directory?
You can do it with the -M file test operator which returns result in floating point decimal days.
$dir = "c:/windows"; $age = -M $dir; print "Dir $dir was last modified $age days ago\n"; # make a new dir just for fun $dir = "c:/foo"; mkdir $dir; $age = -M $dir; print "Dir $dir was last modified $age days ago\n"; rmdir $dir; # delete this test dir
With a dir the concept of modification is a little nebulous - it is actually the days since it was created.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to determine the last modified date for a directory?
by cforde (Monk) on Jul 31, 2001 at 22:27 UTC | |
by tachyon (Chancellor) on Jul 31, 2001 at 22:42 UTC |