# Name: http://www.inwap.com/mybin/index-cgi.txt # Purpose: Documentation for list-files.pl and list-pics.pl I have two versions of my directory-listing programs: http://www.inwap.com/mybin/list-files.pl lists file names only. http://www.inwap.com/mybin/list-pics.pl lists and displays pictures too. You need to copy one of those two files to your directory and give it the name "index.cgi". Then use the UNIX command "chmod +x index.cgi" to make it executable. -Joe # Purpose: Creates a sorted listing of the current directory. # Like the NCSA/Apache httpd, this includes any HEADER and README # files. The default for HTML files is their , # and the default for shell scripts is their "# Purpose:" line. # Any descriptions in "index.txt" will override the defaults. # # This CGI was created explicitly for www.best.com, since the web server # there provides only a rudimentary listing for directories (name and size # only, unsorted). This script should work just fine on any web server that # supports perl CGI; the only UNIX specific part is its use of /usr/bin/file # to get a description of an unknown file. # # Invoking this script as "./index.cgi -" will add entries to index.txt # for files without descriptions. # # Three special entries can appear in index.txt: "." ".." and "-". # . The description for "." will appear on each page in an <H1>...</H1>. # .. The description for ".."; defaults to "Parent directory". # - The line for "-" can have one or more of the following keywords: # ordered => display names in the same order as they are in index.txt # byname => display names in alphabetic order (default) # bydate => display names with newest first # bysize => display names with biggest file first, directories last # nodates = don't display date/time next to file size # bgcolor="#cccccc" => use gray background (default is "white") # background="bg.gif" => use bg.gif for background # Use "<BR>" for "." if needed to break the text into multiple lines.