From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,bde846fd7211850f X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,bde846fd7211850f X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-03-22 04:03:24 PST Xref: sparky comp.os.vms:25410 comp.sys.dec:7983 Path: sparky!uunet!elroy.jpl.nasa.gov!decwrl!waikato.ac.nz!comp.vuw.ac.nz!zl2tnm!toyunix!don Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Number of files on a disk Message-ID: <4521080@zl2tnm.gen.nz> From: don@zl2tnm.gen.nz (Don Stokes) Date: 22 Mar 93 02:49:56 GMT Sender: news@zl2tnm.gen.nz (GNEWS Version 2.0 news poster.) References: <1993Mar9.172318.221@condor> Distribution: world Organization: The Wolery ewbankk@logica.co.uk writes: > I am trying to find a fast? way of finding the number of files on a disk. > Currently I am doing $DIRECTORY/GRAND_TOTAL/OUTPUT=filename disk:[000000...] > and then parsing the output file to get the number of files on the disk. > This takes a long time. Not only is that slow, but for system disks it gives the wrong answers, due to the multiply entered directories. Clustering makes it worse. So does installing VAX RSX.... > Does anyone know of a quicker way (either in DCL or as a SYSTEM/RMS routine) > to get this information. Time to plug DU again. DU, like the unix 'du' command finds out how much disk space is used within a given directory. It works by reading the index file. To say it's faster than DIR/GRAND would be something of an understatement.... This has been posted to vmsnet.internals a while ago, and should be on an archive site somewhere. I could re-post if necessary. -- Don Stokes, ZL2TNM (DS555) don@zl2tnm.gen.nz (home) Network Manager, Computing Services Centre don@vuw.ac.nz (work) Victoria University of Wellington, New Zealand +64-4-495-5052