home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3107 / README < prev   
Encoding:
Text File  |  1991-03-22  |  3.5 KB  |  89 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 (dls).
  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/dls, there should be as a
  57. replacement for ls in anonymous FTP areas.  And that's how simple it
  58. is, once you have dls 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 dls 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 dls 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 a courtesy
  78. copy of strpbrk.c which is Copyright (c) 1985 Regents of the
  79. University of California.  All together, the package can be
  80. distributed provided no profit is made from any distribution, and all
  81. copyright notices remain intact.
  82.  
  83. The Author
  84. ----------
  85. Tim Cook, Systems Administrator, Victoria College Computer Services.
  86.  
  87. I am the administrator of a Sequent S27 (Symmetry),
  88. admin.viccol.edu.au, which runs administrative systems under Oracle.
  89.