Operating System - OpenVMS
1752808 Members
5582 Online
108789 Solutions
New Discussion юеВ

Re: search for folders not modfied since a fixed date and estimate the disk space

 
SOLVED
Go to solution
nipun_2
Regular Advisor

search for folders not modfied since a fixed date and estimate the disk space

Hi,
I have OpenVMS 7.3-2

I am trying to write a script which searches for folders not modified since a fixed date. All the accounts have fixed location of these folder

disk55:[Acct1.data.XXXXXX.FolderXXX]

Now each account has a logical disk55 , and folder name "data". The only thing different

XXXXXXX.FolderXXX where both these folders designate numbers

e.g

disk55:[Acct1.data.000001111.000222]
disk55:[Acct1.data.000001111.000223]
disk55:[Acct1.data.000001114.000229]
.
.
.

Now I need to make a list of FolderXXX

which have not been modified and then add all the disk space in the those folder ?

What is the best way of going about doing so...



I am considering F$search but would like to know if there are more options and ideas...

4 REPLIES 4
Andy Bustamante
Honored Contributor
Solution

Re: search for folders not modfied since a fixed date and estimate the disk space



You can use dir/sin

$ DIRECTORY/MODIFIED/SINCE=14-DEC-1998:01:30 -
disk55:[Acct1.data...]

to produce a list.

What are trying to do with this list. DCL support the same option in BACKUP and DELETE for example.

See the DCL Dictionary and the OpenVMS User's Manual at http://h71000.www7.hp.com/doc/

Andy

Andy

If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
nipun_2
Regular Advisor

Re: search for folders not modfied since a fixed date and estimate the disk space

Thanks Andy,
For now I simply want to make a list and also be aware of the disk space used.

So I was not considering backup or delete commands.
Steven Schweda
Honored Contributor

Re: search for folders not modfied since a fixed date and estimate the disk space

I'd use F$SEARCH(), with F$FILE_ATTRIBUTES(
file_spec, "RDT") to get the revision
date-time. F$DELTA_TIME() can compare the
file's date-time with a time you supply. You
may need F$CVTIME( your_time, "ABSOLUTE") to
get your time into the proper format. Then,
probably, DIRECTORY /GRAND_TOTAL /SIZE = xxx
to get the disk space.

You'll probably need to convert between the
"[Acct1.data.000001111.000222]" form and the
"[Acct1.data.000001111]000222.DIR;1" form.

I'd be spending a lot of time with HELP
LEXICAL.
Ian Miller.
Honored Contributor

Re: search for folders not modfied since a fixed date and estimate the disk space

look at DFU - the SEARCH command is fast and flexible. See
http://www.openvms.org/stories.php?story=06/10/15/3654351
for information on the latest version.
____________________
Purely Personal Opinion