Newsgroups: comp.archives From: timcc@csv.viccol.edu.au (Tim Cook) Subject: [alt.sources.d...] Attention Anonymous FTP administrators! Message-ID: <1991Mar23.010110.23042@ox.com> Followup-To: alt.sources.d,comp.sources.wanted Reply-To: timcc@csv.viccol.edu.au (Tim Cook) X-Original-Newsgroups: alt.sources.d,comp.sources.wanted Archive-name: ftp/admin/dls/1991-03-22 Archive: admin.viccol.edu.au:/pub/dls/dls.shar.Z [139.132.5.1] Original-posting-by: timcc@csv.viccol.edu.au (Tim Cook) Original-subject: Attention Anonymous FTP administrators! Reposted-by: emv@msen.com (Edward Vielmetti, MSEN) I am about to post my contribution to the wonderful world of Anonymous FTP, "dls" and "describe", to alt.sources. I would like to note that it has had minimal testing, but I can't see that there would be anything major wrong with it. This package will also be available via Anonymous FTP (of course!) as pub/dls/dls.shar.Z on admin.viccol.edu.au. As an explanation, I include the README here: Description ----------- Have you ever wondered what on earth "xfrg2.2.tar.Z" was? Are you wondering whether "foo" is really a scratch file? Does it ashame you especially, seeing that these files were created by you? I have the solution for you... File Descriptions. I'm sure some operating system or another once had the ability to set a descriptive comment on a file, but Unix wasn't one of them. It is possible, however, to retro-fit onto Unix an implementation that works quite well. In this package, I have provided a utility to set/delete/list file descriptions (describe), and a directory listing utility that shows any file descriptions that are set next to the respective files (dls). Implementation -------------- The storage/retrieval of file-descriptions is implemented in the following way: All file descriptions are stored in a DBM file called .desc, in the same directory as the files described. This in fact means that you have two files, .desc.pag and .desc.dir. Each description is indexed by the name of the file (excluding any path information). To provide a better chance of finding the description after the file has been renamed (within the same directory), the name is also indexed by the inode-number. This means that the file's description will still be found after it has been renamed (within the same directory) or re-written by an editor. To prevent the two indexes from becoming mixed up, whenever a name/description pair are stored with a name that is the same size as an inode-number, the name is stored with a trailing null byte. Purpose ------- My reason for coming up with this idea is simple. I got tired of logging on to some distant site's anonymous FTP area, and coming across something like: -rw-r--r-- 1 root 214807 May 22 1989 3c503.tar.Z -rw-r--r-- 1 bin 27751 Aug 22 16:35 bonnie -rw-rw-r-- 1 uucp 65383 Aug 23 02:54 dynafeed.tar.Z -rw-r--r-- 1 bin 10444 Nov 3 21:58 fpipe -rw-r--r-- 1 bin 47138 Aug 22 16:41 opaque (good name!) -rw-r--r-- 1 don 683759 May 29 23:21 psiber.tar.Z You know? You sit there and think ... "some of those sound interesting, but it wouldn't be nice for me to download them just to find out what they are...". If there is no other demand for describe/dls, there should be as a replacement for ls in anonymous FTP areas. And that's how simple it is, once you have dls installed, simply copy it to ~ftp/bin/ls, and the FTP daemon will use it instead of standard ls for anonymous logins. The output of dls was actually designed with anonymous FTP use in mind (who cares who owns the file or which group it belongs to?). Of course, the site administrator has to provide meaningful descriptions for what has been put in the anonymous FTP area. I don't think it would be too hard to generate descriptions files from an index of something like comp.sources.unix, though. A dozen lines of perl should do it. An Example ---------- As an example of what an anonymous FTP site that uses dls looks like, try my back yard, admin.viccol.edu.au. Copyright --------- The whole system is Copyright (c) Tim Cook 1991, apart from a courtesy copy of strpbrk.c which is Copyright (c) 1985 Regents of the University of California. All together, the package can be distributed provided no profit is made from any distribution, and all copyright notices remain intact. The Author ---------- Tim Cook, Systems Administrator, Victoria College Computer Services. I am the administrator of a Sequent S27 (Symmetry), admin.viccol.edu.au, which runs administrative systems under Oracle.