From: CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 16-AUG-1990 01:48:52.55 To: MRGATE::"ARISIA::EVERHART" CC: Subj: re: dir/date=read? Received: by crdgw1.ge.com (5.57/GE 1.70) id AA15584; Thu, 16 Aug 90 01:31:05 EDT Received: From UNIX.SRI.COM by CRVAX.SRI.COM with TCP; Wed, 15 AUG 90 22:04:48 PDT Received: from yale!LRW.COM!lrw by unix.sri.com (4.1/SMI-4.0) id AA25150; Wed, 15 Aug 90 22:01:33 PDT Received: by harvard.harvard.edu (5.54/a0.25) (for sri-unix!KL.SRI.COM!INFO-VAX@husc6) id AA19943; Wed, 15 Aug 90 23:30:06 EDT Received: from lrw.UUCP by BULLDOG.CS.YALE.EDU via UUCP; Wed, 15 Aug 90 23:06:58 EDT Message-Id: <9008160306.AA03854@BULLDOG.CS.YALE.EDU> Received: by lrw.UUCP (DECUS UUCP w/Smail); Wed, 15 Aug 90 22:01:09 EDT Date: Wed, 15 Aug 90 22:01:09 EDT From: Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU) To: INFO-VAX@KL.sri.com Subject: re: dir/date=read? X-Vms-Mail-To: UUCP%"ccnucd.Denver.Colorado.EDU!PKLAMMER%cudnvr",INFOVAX We would really like to be able to implement a file-culling mechanism based on least-recently-used (LRU) file access dates like (sigh) TOPS-20's "reaper" and archiving. I see there is no DIR/DATE=READ nor /DATE=ACCESS command; am I right in presuming that no such date-of-use is hidden anywhere in the VMS file system? Surely this kind of issue must have been volleyed in OS-war discussions, or at DECUS; has anyone come up with a way to retire apparently stale files? VMS actually has this feature; it just accomplishes it in a different way from many other systems. Rather than a "date of last access", VMS has an expira- tion date. You can see it with DIR/DATE:EXPIRED. If you try this, you'll probably find that you get "" for all your files, since you have to take some action to get the date set. For example, SET FILE/EXPIR- ATION_DATE lets you set the date from DCL level. Much more to the point, you can have VMS maintain the expiration date automa- tically. You need to use the SET VOLUME/RETENTION command to enable this feature for a given volume. The general format is SET VOLUME/RET=(min,max). This tells VMS that any time a file is accessed, VMS is to ensure that its expiration date is at least min in the future. It does this by setting the expiration date to max from now. If both min and max are very small - say, a second - then the expiration date is essentially a last access date: Since the expiration date will almost always have passed when a file is accessed, it will be reset to a time very close to "now". It's generally better to use considerably larger values, trading off precision in your knowledge of exactly when a file was accessed for fewer updates. Files that have been accessed since min ago will have expiration dates later than "now", by at most max. -- Jerry