home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3930 / README < prev   
Encoding:
Text File  |  1991-08-29  |  5.1 KB  |  128 lines

  1. Description
  2. -----------
  3. Have you ever wondered what on earth "xfrg2.2.tar.Z" was?  Are you
  4. wondering whether "foo" is really a scratch file?  Does it ashame you
  5. especially, seeing that these files were created by you?
  6.  
  7. I have the solution for you...  File Descriptions.
  8.  
  9. I'm sure some operating system or another once had the ability to set
  10. a descriptive comment on a file, but Unix wasn't one of them.  It is
  11. possible, however, to retro-fit onto Unix an implementation that works
  12. quite well.
  13.  
  14. In this package, I have provided a utility to set/delete/list file
  15. descriptions (describe), and a directory listing utility that shows
  16. any file descriptions that are set next to the respective files (dl).
  17.  
  18. Implementation
  19. --------------
  20. The storage/retrieval of file-descriptions is implemented in the
  21. following way:
  22.  
  23.     All file descriptions are stored in a DBM file called .desc,
  24.     in  the same directory as the files described.  This in fact
  25.     means that you have two files, .desc.pag and .desc.dir.
  26.  
  27.     Each description is indexed by the name of the file (excluding
  28.     any path information).  To provide a better chance of finding
  29.     the description after the file has been renamed (within the
  30.     same directory), the name is also indexed by the inode-number.
  31.     This means that the file's description will still be found
  32.     after it has been renamed (within the same directory) or
  33.     re-written by an editor.  To prevent the two indexes from
  34.     becoming mixed up, whenever a name/description pair are stored
  35.     with a name that is the same size as an inode-number, the name
  36.     is stored with a trailing null byte.
  37.     
  38.  
  39. Purpose
  40. -------
  41. My reason for coming up with this idea is simple.  I got tired of
  42. logging on to some distant site's anonymous FTP area, and coming
  43. across something like:
  44.  
  45. -rw-r--r--  1 root       214807 May 22  1989 3c503.tar.Z
  46. -rw-r--r--  1 bin         27751 Aug 22 16:35 bonnie
  47. -rw-rw-r--  1 uucp        65383 Aug 23 02:54 dynafeed.tar.Z
  48. -rw-r--r--  1 bin         10444 Nov  3 21:58 fpipe
  49. -rw-r--r--  1 bin         47138 Aug 22 16:41 opaque    (good name!)
  50. -rw-r--r--  1 don        683759 May 29 23:21 psiber.tar.Z
  51.  
  52. You know?  You sit there and think ... "some of those sound
  53. interesting, but it wouldn't be nice for me to download them just to
  54. find out what they are...".
  55.  
  56. If there is no other demand for describe/dl, there should be as a
  57. replacement for ls in anonymous FTP areas.  And that's how simple it
  58. is, once you have dl installed, simply copy it to ~ftp/bin/ls, and
  59. the FTP daemon will use it instead of standard ls for anonymous
  60. logins.  The output of dl was actually designed with anonymous FTP
  61. use in mind (who cares who owns the file or which group it belongs
  62. to?).
  63.  
  64. Of course, the site administrator has to provide meaningful
  65. descriptions for what has been put in the anonymous FTP area.  I don't
  66. think it would be too hard to generate descriptions files from an
  67. index of something like comp.sources.unix, though.  A dozen lines of
  68. perl should do it.
  69.  
  70. An Example
  71. ----------
  72. As an example of what an anonymous FTP site that uses dl looks like,
  73. try my back yard, admin.viccol.edu.au.
  74.  
  75. Copyright
  76. ---------
  77. The whole system is Copyright (c) Tim Cook 1991, apart from strpbrk.c
  78. which is Copyright (c) 1985 Regents of the University of California.
  79. All together, the package can be distributed provided no profit is
  80. made from any distribution, and all copyright notices remain intact.
  81.  
  82. The Author
  83. ----------
  84. Tim Cook, Systems Administrator, Victoria College Computer Services.
  85. E-mail: timcc@viccol.edu.au
  86.  
  87. I am the administrator of a Sequent S27 (Symmetry),
  88. admin.viccol.edu.au, which runs administrative systems under Oracle.
  89.  
  90. Miscellaneous
  91. -------------
  92. The "dl" command used to be known as "dls", but Ultrix already had a
  93. "dls" command, which is for "DECnet ls", so I changed it.
  94.  
  95. The dl/describe package was developed under DYNIX version 3.0.12,
  96. which is a BSD 4.2 based version of Unix.  This means that dl/describe
  97. should compile on "most" BSD 4.2 derived systems.  It has also
  98. compiled on several SYSV-based systems.  See INSTALL, config.h and
  99. Makefile for porting details.
  100.  
  101. Could I ask all those who install dl in their Anonymous FTP areas to
  102. drop me a line?  Any criticisms, suggestions gladly accepted.  I am
  103. quite interested in what people think of this idea.
  104.  
  105. I am also interested in seeing the results of any porting efforts, so
  106. that I can incorporate them in later releases.  Depending on the level
  107. of my spare time, I would even be prepared to assist you in porting
  108. this to your particular brand of Unix.  I have a desire to see this
  109. propagate as far as possible around the world of Unix anonymous FTP
  110. sites.
  111.  
  112. The Future for dl/describe
  113. ---------------------------
  114. So far, dl has been installed in only a few Anonymous FTP
  115. installations.  I would like to lobby, or have others lobby some of
  116. the larger or more popular sites to have them think about dl.
  117.  
  118. To make dl seem better though, I will be adding the following (I
  119. can't say when though):
  120.  
  121.    1.  Better co-operation with ftpd and the archie system.
  122.  
  123.    2.  A set of commonly used file utilities that are aware of
  124.        descriptions, also to give descriptions a better chance of
  125.        survival.  Probably would be trivial shell scripts.
  126.  
  127.    3.  Better portability.
  128.