home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
hamradio
/
nosvw137.arj
/
FTP
< prev
next >
Wrap
Text File
|
1991-09-18
|
13KB
|
343 lines
=== NOSview [137]
ftp
===
_________________________________________________________________
ftp <host>
_________________________________________________________________
The command 'ftp' is used to initiate an FTP session with <host>.
When the session is established, you will enter converse mode on
the new FTP session.
When in converse mode with an FTP server, only the FTP sub-
commands described below will be valid. This will remain true
until the FTP 'quit' command is issued, ending the FTP session,
and returning you to the "net>" prompt.
When the connection between the two machines is opened, you'll
get a banner from the remote machine, followed by a prompt for
your user name and then your password. If you've negotiated with
the person at the remote machine to have a special user name and
password set up for you in his or her FTPUSERS file, use that.
(See NOSfiles\FTPUSERS for an example of the file).
If not, use one of the special user names, "anonymous" or "guest"
or "bbs", and in this case, use your callsign as your password.
Your password is recorded in the log file on the remote host,
allowing the manager of that host to keep track of FTP activity.
To perform an automatic login to selected hosts, you can set up
the NET.RC file. Each line in the file contains the hostname,
user login name and password, each item separated by a space.
(See NOSfiles\NET.RC for an example of this file).
===============
FTP SUBCOMMANDS
===============
During converse mode with an FTP server, everything typed on the
console is first examined to see if it is a locally-known
command. If not, the line is passed intact to the remote server
on the control channel.
However, if it is one of the following commands, it is executed
locally.
-----------------------------------------------------------------
abort
-----------------------------------------------------------------
Aborts a 'get/mget', 'put/mput', 'dir/ls' operation in progress.
This is the only acceptable command when these operations are in
progress; all other commands will result in an error message.
Abort is valid only when a transfer is in progress. When a 'get'
or 'put' operation is aborted, a partial copy of the transferred
file will be left on the destination machine. This copy must be
removed manually if it is unwanted.
This is also true for a 'dir' or 'ls' operation when the
directory listing is written as a local file.
-----------------------------------------------------------------
ascii
-----------------------------------------------------------------
Sets the file transfer mode to ASCII. This is the same as the
'type a' command.
-----------------------------------------------------------------
batch on|off Default: off
-----------------------------------------------------------------
>> Example: batch on
-----------------------------------------------------------------
binary
-----------------------------------------------------------------
Sets the file transfer mode to binary, or "image" mode. This is
the same as the 'type i' command.
-----------------------------------------------------------------
cd <remote_directory>
-----------------------------------------------------------------
Changes the current directory on the remote host to the directory
indicated by <directory>, which must be an existing directory on
the remote host. The directory specified can be relative to the
current directory, or absolute, with the name beginning at the
root (/).
>> Example: cd public/tmp
-----------------------------------------------------------------
dele <remote_filename>
-----------------------------------------------------------------
Deletes a file on the remote system. You must have delete
privilege on the remote host to use this command.
>> Example: dele foo.txt
-----------------------------------------------------------------
dir [<remote_filename>|<remote_directory> [<local_filename>]]
-----------------------------------------------------------------
Without arguments, 'dir' requests that a full directory listing
of the remote server's current directory be sent to the terminal.
The full listing gives the file names, sizes and creation dates.
If one argument is given, this is passed along in the LIST
command; this can be a specific file or subdirectory that is
meaningful to the remote file system.
If two arguments are given, the second argument is taken as the
local file into which the directory listing should be put
(instead of being sent to the console). The PORT command is used
before the LIST command is sent.
You should request a directory listing when you first log into an
unfamiliar machine. There will often be a file named 'readme' or
'whathere.txt' that will give some information about the files
available on the remote machine. This file can then be acquired
with a "get" command (described below), and read on your machine
to learn more about the files available on the remote host.
>> Example: dir public
-----------------------------------------------------------------
get <remote_filename> [<local_filename>]
-----------------------------------------------------------------
Asks the remote server to send the file specified in the first
argument.
The second argument, if given, will be the name of the file on
the local machine; otherwise it will have the same name as on the
remote machine. The PORT and RETR commands are sent on the
control channel.
Before using 'get' you must set the correct transfer mode, using
the 'type' command described below.
Use the 'abort command if you want to terminate the transfer
before it has been completed.
>> Example: get public/autoexec.bat
-----------------------------------------------------------------
hash
-----------------------------------------------------------------
A synonym for the 'verbose 3' command.
-----------------------------------------------------------------
list [<remote_filename> | <remote_directory> [<local_ filename>]]
ls [<remote_filename> | <remote_directory> [<local_ filename>]]
-----------------------------------------------------------------
The 'list' and 'ls' commands are identical to 'dir', except that
the "NLST" command is sent to the server instead of the "LIST"
command. This results in an abbreviated directory listing; i.e.
one showing only the file names themselves without any other
information.
>> Example: ls public
-----------------------------------------------------------------
mget <remote_filename> [<remote_filename> ...]
-----------------------------------------------------------------
Fetch a collection of files from the server. File names may
include wild card characters; they will be interpreted and
expanded into a list of files by the remote system using the NLST
command. The files will have the same name on the local system
that they had on the server.
Before using 'mget' you must set the correct transfer mode, using
the 'type' command described below.
Use the 'abort command if you want to terminate the transfer
before it has been completed.
>> Example: mget *.txt
-----------------------------------------------------------------
mkdir <remote_directory>
-----------------------------------------------------------------
Creates a directory on the remote machine. You must have write
privilege on the remote machine to use this command.
>> Example: mkdir tmp
-----------------------------------------------------------------
mput <local_filename> [<local_filename> ...]
-----------------------------------------------------------------
Send a collection of files to the server. File names may include
wild card characters; they will be expanded locally into a list
of files to be sent. The files will have the same name on the
server as on the local system.
Before using 'mput' you must set the correct transfer mode, using
the 'type' command described below.
You must have write privilege on the remote host to use this
command.
Use the 'abort command if you want to terminate the transfer
before it has been completed.
>> Example: mput *.txt
-----------------------------------------------------------------
pass <password>
-----------------------------------------------------------------
Normally you will be asked for your password when you log in to
FTP. However, if you mistype your password and the remote system
rejects it, you can then try again with the 'pass' command.
>> Example: pass foobar
-----------------------------------------------------------------
put <local_filename> [<remote_filename>]
-----------------------------------------------------------------
Send a local file to the server. The second argument, if given,
will be the name of the file on the remote machine; otherwise it
will have the same name as on the local machine. The PORT and
STOR commands are sent on the control channel.
Before using 'put' you must set the correct transfer mode, using
the 'type' command described below.
You must have write privilege on the remote host to use this
command.
Use the 'abort command if you want to terminate the transfer
before it has been completed.
>> Example: put myfoo.txt yourfoo.txt
-----------------------------------------------------------------
pwd
-----------------------------------------------------------------
Displays the name of the current directory on the remote host.
('pwd' literally means "print working directory".
-----------------------------------------------------------------
quit
-----------------------------------------------------------------
Terminates the FTP session and returns you to the "net>" prompt.
-----------------------------------------------------------------
rmdir <remote_directory>
-----------------------------------------------------------------
Deletes a directory on the remote machine. You must have delete
privilege on the remote host to use this command.
>> Example: rmdir tmp
-----------------------------------------------------------------
type [a | i | l <bytesize>] Default: a
-----------------------------------------------------------------
Tells both the local client and remote server the type of file
that is to be transferred. The 'type' command sets the local
transfer mode and generates the TYPE command on the control
channel.
Type 'a' means ASCII (i.e. a text file). In ASCII mode, files
are sent as varying length lines of text in ASCII separated by
CR/LF sequences. The 'type a' command is the same as 'ascii'.
Type 'i' means image (i.e. binary). In image mode, files are
sent exactly as they appear in the file system. The 'type i'
command is the same as 'binary'.
Type 'l' (logical byte size) is used when exchanging binary files
with remote servers having oddball word sizes (eg. DECSYSTEM-10s
and 20s). Locally it works exactly like image, except that it
notifies the remote system how large the byte size is. The
parameter <bytesize> is typically 8.
ASCII mode should be used whenever transferring text between
dissimilar systems (eg. UNIX and DOS) because of their different
end-of-line and/or end-of-file conventions. When exchanging text
files between machines of the same type, either mode will work
but image mode is usually faster.
Naturally, when exchanging raw binary files (executables,
compressed archives, etc) image mode must be used.
See also the 'ftype' command.
>> Example: type a
-----------------------------------------------------------------
user <username>
-----------------------------------------------------------------
Normally you will be asked for your username when you log in to
FTP. However, if you mistype your name and the remote system
rejects it, you can then try again with the 'user' command.
>> Example: user phil
-----------------------------------------------------------------
verbose [0 | 1 | 2 | 3] Default: 2
-----------------------------------------------------------------
Set or display the level of message output in file transfers.
Verbose 0 gives the least output, and verbose 3 the most, as
follows:
0: Display error messages only.
1: Display error messages plus a one-line summary after each
transfer giving the name of the file, its size, and the
transfer time and rate.
2: Display error and summary messages plus the progress messages
generated by the remote FTP server.
3: Display all messages. In addition, a "hash mark" (#) is
displayed for every 1,000 bytes sent or received. 'verbose
3' is equivalent to 'hash'
If a command is sent to the remote server because it is not
recognized locally, the response is always displayed, regardless
of the setting of 'verbose'. This is necessary for commands like
'pwd' (display working directory), which would otherwise produce
no message at all if 'verbose' were set to 0 or 1.
>> Example: verbose 0