From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 18-APR-1992 00:42:46.59
To:	info-vax@kl.sri.com
CC:	
Subj:	DU

Bjorn.S.Nilsson@nbi.dk emailed me:

>A few days ago you posted du to vmsnet.sources. As you write, it is
>quite fast. I have found one problem with it though: it does not search
>the device name back to find the real device name. Therefore du does not
>find the index file if I do
>
>$ du sys$common:[oper]
>%RMS-E-FNF, file not found

It's a known bug -- fixing it seems to have fallen through the cracks.
DU is supposed to parse out rooted logicals, and does when searching the 
directory structure.  I dropped the ball when opening INDEXF.SYS though.

>Is it hard to change du to do this "correctly"?

Not a problem:

--cut-here--
$ EDIT/SUM DU.MAR/UPDATE=SYS$INPUT:
$DECK
-1
		.ident		"1.2"
-32
;	17/4/92/dcs	Bugfix -- the INDEXF directory was being accessed 
;			using the device name prior to parsing, if a rooted
;			logical was used eg SYS$COMMON, the index file would
;			be looked up under as SYS$COMMON:[000000]INDEXF.SYS.
;			The device name for the INDEXF lookup is now added to
;			the index file FAB after being parsed.
-264,265
-375
		movb search_nam+NAM$B_DEV, indexf_fab+FAB$B_DNS
		movl search_nam+NAM$L_DEV, indexf_fab+FAB$L_DNA
/
$EOD
$ EXIT
--cut-here--


Neil Readwin <nreadwin@micrognosis.co.uk> added some sorting stuff to DU 
a while ago, but I haven't got around to adding the changes to the 
"official" copy yet.  He writes:

>OK, so here is what I did to DU. I ended up using SOR$ and the results are
>fairly ugly. My MACRO is much rustier than I thought and since I was both
>unwell and in a hurry the way I added the /SORT feature is not very elegant.

The help for his /SORT qualifier reads:

|/SORT (D = /SORT=NAME)
| The /SORT flag specifies the order in which the directories are listed in
| the output. The options are:
|
|        NAME            Sort directory names in alphabetical order
|        SIZE            Sort by total disk space used
|        ALLOCATED       Sort by total disk space allocated
|        FILES           Sort by number of files

I may add the changes, or re-kludge them as an in-core sort.  Someday. 8-)


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

