![]() |
Using FTP and Anonymous FTPTable of ContentsIntroductionWhat is FTP? What is this Document? TCP/IP The Basics
FTP SYNTAXWhile there are a variety of FTP commands, the following are the most common (but check your own system for which commands are available):
Browsing on a remote machine
Directories in FTP
Types of files
Transferring files
Other Commands
Anonymous FTPAnonymous FTP allows users to read files from (and in some cases write to) special directories residing on remote hosts. There are several reasons as to why such directories are created. Two of the most common are: 1) distribution of publicly available software; and 2) access to archival records of discussion groups. An example of how to access one such group is provided below. Anonymous FTP is useful because it allows all users who do not have a login name or a password to access and copy most files. This type of FTP has a special login name: "anonymous". When connecting to a remote host you give "anonymous" as your login name. As for the password, FTP accepts any string, but the managers of the server prefer the electronic mail address of the user to keep track of users. After signing is as "anonymous", you can access the relevant directories and "get" those files that are permitted to the anonymous FTPers. The conventions illustrated in previous examples hold. The following example shows how to FTP to the server jse.sta.ncsu.edu. $ ftp jse.stat.ncsu.edu #start FTP connection to remote host Connected to jse.stat.ncsu.edu. 220 jse JSE Information Service (Version 6.19 Tue Jul 13 15:22:02 EDT 1993) ready. Name (jse.stat.ncsu.edu:pitruzz): anonymous enter logon id 331 Guest login ok, send e-mail address as password. Begin your password entry with a - (dash) to suppress the helpful messages. Password:abc12@foo.edu type your email adress 230-Welcome! 230-This is the Journal of Statistics Education Information Service. 230-If you have problems, try using a dash (-) as the first character 230-of your password -- this will turn off continuation messages that may 230-be confusing your ftp program. 230-If you experience unusual problems, please report them via e-mail 230-Please note that all transactions done through anonymous ftp are 230-recorded for reporting and accounting purposes. 230 Guest login ok, access restrictions apply. ftp> dir check remote general directory 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. total 31 dr-xrwxr-x 2 0 10 512 Jul 16 15:21 .cap -rw-r--r-- 1 0 1 12550 Jul 27 14:15 access.methods -rw-r--r-- 1 0 10 1203 Jul 26 14:03 readme dr-xrwxr-x 9 0 10 512 Jul 16 15:57 software 226 Transfer complete. 891 bytes received in 0.74 seconds (1.2 Kbytes/s) ftp> cd software change to sub-directory software 250-Please read the file readme 250- it was last modified on Fri Jul 16 11:49:41 1993 - 27 days ago 250 CWD command successful. ftp> dir check sub-directory software 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. total 19 drwxrwxr-x 3 20 10 512 Jul 16 15:57 info -rw-r--r-- 1 20 10 11526 Jul 16 15:49 readme drwxrwxr-x 3 20 10 1024 Jul 16 15:05 sas 226 Transfer complete. 499 bytes received in 0.19 seconds (2.6 Kbytes/s) ftp> cd sas change to sub-directory sas 250-Please read the file readme 250- it was last modified on Fri Jul 16 11:05:43 1993 - 27 days ago 250 CWD command successful. ftp> dir check sub-directory sas 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. total 2652 drwxr-xr-x 2 20 10 512 Jul 16 15:06 .cap -rw-r--r-- 1 20 10 96924 Jul 16 15:05 sasusage.pak 226 Transfer complete. 2678 bytes received in 1.2 seconds (2.1 Kbytes/s) ftp> get sasusage.pak get file sasusage.pak 200 PORT command successful. 150 Opening ASCII mode data connection for sasusage.pak (75940 bytes). 226 Transfer complete. local: sasusage.pak remote: sasusage.pak 77446 bytes received in 19 seconds (4 Kbytes/s) ftp> quit quit to local UNIX host 421 Timeout (900 seconds): closing control connection. $ Using GZIP.EXE and PKUNZIP.EXE to Uncompress DPLS DataMost of our data are stored in what is called GZIP (gnuzip) and PKZIP (pkunzip) format. PKZIP is a standard in the PC world for compressing files. GZIP is a method of compression (similar to PKZIP) but originally designed for UNIX systems. These files (usually identified with a .gz or .z file suffix if GZIP, .zip if PKZIP) need to be downloaded AS BINARY (e.g., type bin at the ftp prompt) and then uncompressed for use.
|
©2008 Data and
Information Services Center, University of Wisconsin-Madison.
If you have trouble accessing this page, please contact disc@mailplus.wisc.edu.