From owner-freebsd-questions@FreeBSD.ORG Wed Feb 10 16:59:35 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98BE51065679 for ; Wed, 10 Feb 2010 16:59:35 +0000 (UTC) (envelope-from nvidican@m2.vidican.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 2185E8FC0A for ; Wed, 10 Feb 2010 16:59:34 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 19so40033fgg.13 for ; Wed, 10 Feb 2010 08:59:34 -0800 (PST) MIME-Version: 1.0 Sender: nvidican@m2.vidican.com Received: by 10.216.86.211 with SMTP id w61mr292797wee.6.1265821172375; Wed, 10 Feb 2010 08:59:32 -0800 (PST) X-Originating-IP: [136.2.1.153] In-Reply-To: <20100210163756.GJ58179@mech-cluster241.men.bris.ac.uk> References: <20100210150330.GC58179@mech-cluster241.men.bris.ac.uk> <20100210100536.150614a1.wmoran@potentialtech.com> <20100210151102.GD58179@mech-cluster241.men.bris.ac.uk> <201002101235.17641.dmw@coder.cl> <20100210163756.GJ58179@mech-cluster241.men.bris.ac.uk> Date: Wed, 10 Feb 2010 11:59:32 -0500 X-Google-Sender-Auth: 0625171018026071 Message-ID: <795fc2b81002100859s2bba2d61nec5c85524dc248bc@mail.gmail.com> From: Nathan Vidican To: Anton Shterenlikht Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Daniel Molina Wegener , freebsd-questions@freebsd.org, Bill Moran Subject: Re: creating htmls from a directory tree? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 16:59:35 -0000 Could do something simple with a Perl script as such: #!/usr/bin/perl use strict; my @filenames = `ls`; print "Content-type: text/html\n\n"; print "See the list below, click an item to open it:
\n\n"; foreach my $F (@files) { print "
  • $F
  • \n"; } print "
    \n"; # EOF You could, of course, get much fancier as it goes - but that's the quick and dirty of doing it with a simple cgi script anyways. -- Nathan Vidican nathan@vidican.com On Wed, Feb 10, 2010 at 11:37 AM, Anton Shterenlikht wrote: > On Wed, Feb 10, 2010 at 12:35:12PM -0300, Daniel Molina Wegener wrote: > > On Wednesday 10 February 2010, > > Anton Shterenlikht wrote: > > > > > On Wed, Feb 10, 2010 at 10:05:36AM -0500, Bill Moran wrote: > > > > In response to Anton Shterenlikht : > > > > > I'd like to upload a directory structure to a web > > > > > server. I'd like to create in each subdirectory > > > > > an index.html with a simple list of files in this > > > > > directory for a simple browsing. > > > > > > > > > > This sounds like a perl or shell script, but > > > > > I was wondering if there is someting like > > > > > this already available from ports. I couldn't > > > > > find anything suitable. > > > > > > > > You could just turn on Apache's built-in directory listing capability > > > > and Apache will create those files on-demand. > > > > > > I see.. I need to talk to the web server guys then. > > > > Also you can try WebDAV modules and clients ;) > > After a quick read on wikipedia, > I think it's very unlikely the web server guys will > be happy with this, from the security point of view. > > Anyway, thanks for the idea, now I know. > anton > > -- > Anton Shterenlikht > Room 2.6, Queen's Building > Mech Eng Dept > Bristol University > University Walk, Bristol BS8 1TR, UK > Tel: +44 (0)117 331 5944 > Fax: +44 (0)117 929 4423 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >