Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!GE-CRD.ARPA!JOHNC%CAD2.DECnet From: JOHNC%CAD2.DECnet@GE-CRD.ARPA Newsgroups: comp.os.vms Subject: Last Access for files Message-ID: <8704300030.AA25977@ucbvax.Berkeley.EDU> Date: Tue, 28-Apr-87 12:18:00 EDT Article-I.D.: ucbvax.8704300030.AA25977 Posted: Tue Apr 28 12:18:00 1987 Date-Received: Sat, 2-May-87 04:49:33 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 40 > Is there any way to retrieve the last-accessed date for files? Not directly, but you can come pretty close. If you set a retention period for the volume set vol/retention=(90-,90-) $255$dua15 and then mark all the existing files on the volume with an expiration date set file/expir=(today+90 days) [000000...]*.*;* then you can use the expiration date to get last accessed date. In the above examples the retention period is set to 90 days. Any newly created files will have an expiration date of 90 days after creation. To start off with we also mark all current files with the same expire date. Each subsequent access to any file on that volume will update the expiration date to date_of_access+retention_period. Experiment a little to find out what operations update the expire date (TYPE does but DIR doesn't; DCL and FORTRAN opens differ slightly). Now, if you want to find files 90 days old it's easy: dir/expir/before=today or backup/del/expir/before=today and if you want to find all files over 50 days old: dir/exp/before=(today+40 days) From that base you can make an archival system which cleans up "dead" storage, however your installation defines it. John Child "Keypunch? What's that?" General Electric "For the times, they are a' changin..." Aircraft Engines Lynn MA