HTML directory listings
Posted on September 9th, 1997 by shacker
If you want to create a directory listing in HTML format, paste this shell script into a text editor and save it to /boot/home/config/bin/dirlist:
echo <html><head></head><body> >
dirindex.html
ls -1 | awk '{print "<a href="" $0 "">" $0 "</A><BR>"}'
>> dirindex.html
echo </body></html> >> dirindex.html
Open a Terminal, cd to any directory, and run dirlist. You’ll end up with an HTML document in that directory called dirindex.html containing hyperlinks to all the files in the directory.