A Complete Guide to Web Design

(やまだぃちぅ) #1
Uploading Documents (FTP) 57

ServerThe Unix

Uploading Documents (FTP)

Web Design in a Nutshell, eMatter Edition

% pwd
/user/jen/work

rm
rm [filename]


rmdeletes files (called by name). Be very careful when removing files because it
cannot be undone.


rmdir
rmdir [dirname]


This allows you to remove a directory (dirname) as long as it doesn’t contain any
files.


File Naming Conventions


In order for your files to traverse the network successfully, you must name them in
accordance with established file naming conventions.



  • Avoid character spaces in filenames. Although this is perfectly acceptable for
    local files on a Macintosh or Windows 95/98/NT machine, character spaces
    are not recognized by other systems.

  • Avoid special characters such as ?, %, #, etc. in filenames. It is best to limit
    filenames to letters, numbers, underscores (in place of character spaces),
    hyphens, and periods.

  • Use proper suffixes. HTML documents require the suffix.html(or.htmif on a
    Windows server). GIF graphic files take the suffix.gif, and JPEGs should be
    named.jpgor.jpeg. If your files do not have the correct suffix, the browser
    will not recognize them as web-based files. Suffixes for a large number of
    common file types are listed later in this chapter.

  • Filenames are case-sensitive in HTML. Consistently using all lowercase letters
    in filenames, while certainly not necessary, may make them easier to remem-
    ber.


Uploading Documents (FTP)


The most common transaction a web designer will have with a web server is the
uploading of HTML documents, graphics, and other media files. Files are trans-
ferred between computers over a network via a method called FTP (File Transfer
Protocol).


If you are working in a telnet session on Unix, you can run theftpprogram and
transfer files with a hefty collection of command-line arguments (not covered in
this book).


Fortunately, if you work on a Mac or PC, there are a number of FTP programs
with graphical interfaces that spare you the experience of transferring files using
Unix command lines. In fact, FTP functions are now built right into most

Free download pdf