ftp
(or ftp
site address) at the UNIX
($) prompt. When an FTP session is initiated, the prompt changes to
ftp>
. Once connected to the site, you will be asked for NAME
(your account). Type anonymous
. Then, when asked for password,
type your email address (in most cases).
Purpose | Command |
---|---|
Get full list of FTP host commands within FTP session | help |
Initiate FTP session | ftp OR ftp site address |
Connect to a site if you opened a session without specifying the site name | open site address |
Display name of directory you are currently in | pwd |
Display names of files in directory | ls -al |
..as above, but "piped" (scrolls one screen at a time) | ls -al | more |
Change directory: Absolute Relative |
cd / directory namecd
directory name |
Move up one level in a directory structure | cd .. OR cdup |
Display text of specific file, pausing screen by screen | get filename|more |
Transfer or copy file from FTP host to CUNIX (+ see note about binary files) | get filename |
Transfer or copy multiple files from FTP host to CUNIX: Using multiple filenames Using wildcards (*) to substitute for some characters. |
mget filename filename ... mget
*.txt |
Check space available in your CUNIX account | quota -v |
Exit FTP session | quit |
Some larger FTP files can occupy considerable space, so make sure that you
have enough space available for the file(s) you are retrieving before you launch
your FTP session. Use the quota -v
command to check your space
quota and overall usage on your CUNIX account. Then use the pwd
command to find the full name of your home directory; then match that
name with the correct line of the display shown with your quota -v
display. The usage, quota, and limit columns are measured in kilobytes.
If what you want is bigger than the space you have available, then you can
use the scratch directory to temporarily store larger files. You must change
your directory before you begin your FTP session: type cd /scratch
at the UNIX ($) prompt.
After you are finished, download these files
to your microcomputer using Kermit or PC/Mac FTP client software and delete the
files in /scratch.
There are many file types in FTP archives and they are usually tagged with an extension denoting the format. Some examples:
Extension | File type | Data type | Extension | File type | Data type | |
---|---|---|---|---|---|---|
.txt |
ASCII/text | ASCII | .doc |
ASCII/text | ASCII | |
.com
| program | binary | .exe
| program | binary | |
.ps |
postscript | binary | .Z |
(UNIX) compressed | binary | |
.zip |
(DOS) compressed | binary | .gif |
graphics | binary |
binary
at the ftp>
prompt before
getting the file. To return to ASCII format, type ASCII
at
the ftp>
prompt before getting the file. If you use Kermit to
download files from CUNIX to your machine, start up Kermit on CUNIX with the
kermit -i
option, which signifies that you are transmitting a file
in binary format, not in text format.
man
ftp
at the UNIX prompt ($): man ftp