|
File Management |
|||||||||
|
The following remarks are more technical in nature. If you are only going to
use Web content and not produce it, you can skip this.
However, if you are
going to be producing and
serving Web pages, either from your own server or someone
elses, there are some technical aspects of file management and transmission
that you will probably need to know.
File Management Chores
File Archiving and Compression
On Unix systems the common archiving tool is called tar, and compression is normally accomplished using a program called compress or one called gzip. The resulting extensions are normally .tar for tar archives, .Z for Unix compressed files, and .gz for gzipped files. Dearchiving on Unix systems is also accomplished with tar, while uncompress and gunzip will decompress files originally compressed with compress and gzip, respectively (gunzip will also decompress files compressed with Unix compress). A common Unix operation is to archive a set of files with tar and then compress the archive. The resulting files normally have extensions that are concatenations of the archiving and compression extensions. For example, a tar archive that has been compressed using gzip will normally have .tar.gz as its extension. Such a compressed archive would be converted to the original files and directories by first decompressing with gunzip and then dearchiving with tar. The Unix archiving and compression tools have been ported to both Macintosh and PC systems, so it is possible to use and manipulate tar, Unix compress, and gzip files on those platforms if you obtain the appropriate software. For example, the commercial versions of Stuffit on the Macintosh have translators to convert these formats, and the shareware programs tar, suntar, and MacGzip implement tar and gzip/gunzip on Macintoshes.
The most common compression/archiving
tool on the PC is pkzip, which produces
files with a .zip extension. These are dearchived and decompressed
with pkunzip.
The program WinZip also produces compressed archives on the PC; it can uncompress
and/or unarchive files in a number of formats, including archives created with
Unix tar and files compressed with both Unix compress and gzip.
Encoding
For transfer of Macintosh binary files over the network it is common that they are archived using Stuffit and then encoded using BinHex 4.0. The resulting files usually have an extension .sit.hqx. The freeware program Stuffit Expander will first decode such a file and then will expand the archive to recover the original files or directories that were archived. Many mail programs, particularly those commonly available for Windows systems, now support the attachment of binary files to mail messages. Consequently, in many cases encoding/decoding is no longer a matter that one has to deal with when transferring binary files by mail. WinZip can open and extract the contents of files created with either Macintosh BinHex or Unix uuencode, in case you should acquire such files, e.g., via ftp.
Server Uploads and Downloads
If you have any doubt about the character of a file, you can usually tell if it is binary or ASCII by opening it with a plain text editor (like SimpleText or TeachText for the Macintosh or NotePad for a PC). If the file has strange characters in it (if it resembles the comic strip representation of cursewords) , it is probably binary. The safest option is to transfer it as a binary file if you are uncertain. If you are going to be uploading files to Network servers, you are also well advised to bear in mind the remarks made previously about case sensitivity and blank spaces in file and directory names. Finally, if the directory structure for your Web site is complicated you will need some familiarity with directory trees and how to navigate within them on your computer and on your server (see the section on paths and relative addresses). Since these may be different platforms with different directory navigation methods, you may have to be able to do this for more than one system. We also note that in the case of a complex directory structure it may be advantageous to archive whole sets of directories for transfer between the systems. However, this will depend on the details of the two systems, since you must have the relevant software present on the two systems to archive on one end and dearchive on the other. Consult your local gurus to develop an optimal strategy for file transfer to and from your server.
| |||||||||