Skip Navigation Links 

U of A University Information Technology Services

Was this page helpful?
 [+]





...Or log into AskIT
and request help.

 

Display Directory Contents

If a web browser is used to directly access a directory with no index.html file in it on comp.uark.edu or cavern.uark.edu, a server error will be returned. This way no one can view the contents of your directories.

If you would like for visitors to be able to view the contents of one of your directories, you can set up an index.html file to allow that. For instance, you might want to place several photos or other files in a directory and have an automatic listing with links for each of the files.

  1. Create a file called index.html in the directory for which you would like to have a file listing. You will probably want to create a new directory for this; if it is on comp.uark.edu, make sure it is a subdirectory under public_html so that it will be accessible by a web browser. You can use Pico to create the file in your account (using SSH Secure Shell for Windows or Macintosh SSH) or upload the HTML file. You can create it using a plain text editor like Notepad or by editing the HTML code in an HTML editor such as Dreamweaver or KompoZer.
  2. Put the basic required HTML tags in the file. An HTML editor will already have these in a new file.
    <HTML><HEAD><TITLE>Title Text</TITLE></HEAD><BODY>
    ...</BODY></HTML>
  3. In the body of the HTML (between the <BODY> tag and the </BODY> tag), type the following (or copy and paste):
    on comp.uark.edu:
    <!--#exec cmd="/export/home/services/www/cgi-bin/mi" -->
    on cavern.uark.edu:
    <!--#exec cmd="/cgi-bin/mi" -->
  4. Save your file or upload (publish) it (to the directory in which you plan to place your files) if you have used a local editor.
  5. If you create your index.html file using Pico, you must set permissions on the file. 

If you are unfamiliar with HTML coding and just want the basic display, you can download the appropriate file below and transfer it to your account. Since these are HTML files you need to right-click and choose "Save Target As..." (or on a Mac Option-click).

Some content altering switches that you can use with this command on comp.uark.edu (not available on cavern.uark.edu) are:

  • -no -- files and sizes only
  • -simple -- Keep the display simple (files only)
  • -si -- Show images in directory
  • -r -- recursively displays directory contents

These switches can be added to the end of the command, for example:

<!--#exec cmd="/export/home/services/www/cgi-bin/mi -no" -->

View the directory listing using a URL similar to the following:
http://comp.uark.edu/~username/new_directory/

where "username" is your actual username and "new_directory" is the name of the directory into which you uploaded the files.

Here is how the directory listing will look:

file listing links created using an mi file

 

 

Thank you for visiting ITS. This page can be found at:
http://uits.uark.edu/web/index_4764_ENG_HTML.htm
Follow us with RSS   Bookmark us using Add This   Follow us on facebook   Follow us on twitter   Follow Us