home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19802 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.9 KB  |  55 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!ames!tgv.com!MADISON
  3. From: madison@tgv.com (Matt Madison)
  4. Subject: Re: Request help !
  5. Message-ID: <1992Dec23.195628.15556@news.arc.nasa.gov>
  6. Sender: usenet@news.arc.nasa.gov
  7. Reply-To: madison@tgv.com
  8. Organization: The Foundation for Dinner Peas
  9. References: <00965847.9D4D2780.30461@VAX1.Bemidji.MSUS.EDU>
  10. Date: Wed, 23 Dec 1992 19:56:28 GMT
  11. Lines: 42
  12.  
  13. In article <00965847.9D4D2780.30461@VAX1.Bemidji.MSUS.EDU>, w1c2l3@VAX1.BEMIDJI.MSUS.EDU writes:
  14. >I read a mail (I forgot the name of the sender) about recursive directory
  15. >specification, using this command :
  16. >
  17. >$ CREATE /DIR [.1]
  18. >$ SET FILE /ENTER=[.1]2.DIR 1.DIR
  19. >
  20. >The first time I access 1.DIR, I could see 2.DIR.
  21. >Then, when I access 2.DIR, I could see another 2.DIR, and that 2.DIR seemed
  22. >endless. Everytime I access the next one, I would always see another one,
  23. >kind of getting deeper and deeper.
  24. >
  25. >Can someone please explain to me what in happening ?
  26.  
  27. Sure -- it's recursing.  The directory entry [.1]2.DIR is really just pointing
  28. back to 1.DIR, so when you SET DEFAULT [.1.2], you're really seeing the contents
  29. of the [.1] directory all over again.
  30.  
  31. >I also tried to delete the directory :
  32. >I delete 2.DIR first, since it's lower that 1.DIR, using this command :
  33. >( I did this after I access 1.DIR)
  34. >
  35. >$ SET PROT:O:D 2.DIR
  36. >$ DEL 2.DIR;*
  37.  
  38. This is because 2.DIR is actually 1.DIR.  In order to be able to delete
  39. a file, you must have WRITE access to the directory containing that file --
  40. by setting the protection to O:D, you don't have write access any more.
  41. So:
  42.  
  43.     $ SET PROTECTION=O:WD 2.DIR
  44.     $ DELETE 2.DIR;
  45.  
  46. should work.  Of course, since 2.DIR is simply a directory entry, you could
  47. (and probably should) instead do
  48.  
  49.     $ SET FILE/REMOVE 2.DIR;
  50.  
  51. -Matt
  52. --
  53. Matthew Madison | madison@tgv.com    | +1 408 427 4366
  54. TGV, Inc.       | 603 Mission Street | Santa Cruz, CA 95060 USA
  55.