open host
[port]
Open a connection to host .
If the auto-login option is on (default), ftp will also attempt to automatically log the user in.
- If
password is not specified and the host requires it,
the user will be promped for it (after disabling local echo).
- If
account is not specified, and the host requires it, the user will be prompted for it.
Some hosts (like source file or documentation repositories) permit users without specific authorization to get
and even put files. This is called anonymous ftp. The username used is anonymous
and the pasword is your emailaddress.
user user-name
[password] [account] Identify to the remote host.
| account [acct-code]
Supply an acct-code if used by a remote system .
| close
disconnect
quit
bye
|
| cd rmt-directory Change the working directory on the remote host
| lcd [local-directory ] | Change the working directory on the local host to local-directory
| cdup Change the remote directory up to the its parent
| pwd Print the current Working Directory on the remote host.
| mkdir rmt-directory Make rmt-directory .
To make a local directory, escape to a command shell using !mkdir local-directory .
rmdir rmt-directory remove
rmt-directory
|
| get rmt-file [local-file]
recv
If local-file is not specified, it is given the same
name. † *
| reget rmt–file local–file]
| get, except that if local-file exists and is
smaller than rmt-file , local-file is presumed to be a partially transferred copy
of remote-file and the transfer is continued from the apparent point of failure.
See rsync.
| newer file‑name local‑file ] get file‑-name
if the modification time of the remote file is more recent that the file on the local host or if the local file does not exist.
| mget rmt-files
Expand wild carded rmt-files and do a get for each file, prompting if enabled.
See glob for details on the filename expansion. †
| put local-file rmt-file]
send
If rmt-file is unspecified, the local-file name is used †.
*
See rsync.
| mput local-files Expand wild carded local-files and put them.
See glob for details of filename expansion. †
| append local‑file rmt‑file] | If
rmt‑file is left unspecified, the local‑file name is used
in naming the remote file†*.
| rename from] [to] Rename the file from on the remote host, to the file to.
| delete rmt‑file
mdelete [rmt-files] Multiple Delete using wild card remote-files
| lsrmt-directory ] [local‑file]
List the current working directory or rmt‑directory.
including any system-dependent information ; for example, most
UNIX systems will produce output from the command ls -l.
If interactive prompting is on, ftp will prompt the user to verify that the
last argument is indeed the target local‑file for receiving
ls output.
If no local file is specified, or if local‑file is -, the output is sent to the terminal.
| dirrmt‑directory] [local-file]
Display a listing of the current working directory or rmt-directory outputting it to local-file or the terminal. If interactive prompting is on, ftp will prompt
the user to verify that the last argument is the target local file for receiving dir output.
If local-file is - , output comes to the terminal.
| modtime rmt-file Show the last modification time of the file on the remote host.
| mdir rmt-files local-file Multiple dir remote files outout to local-file.
If interactive prompting is on, ftp will prompt the user to verify that the last argument is indeed the target local file
for receiving mdir output.
| nlistrmt-directory ] [local-file] list the filenames current working directory or remote-directory
| mls rmt-files local-file
Like nlist, except multiple rmt-files may be specified,
and the local-file must be specified. If interactive prompting is on, ftp will prompt the user to verify that the last
argument is indeed the target local file for receiving mls output.
| size rmt-file Return size of rmt-file
|
| binary
image | no changes are made to file contents, a MUST for non plain text files(images, .DOC s).
| ASCII | Files are considered to be plain text.
Line terminaters will be CHANGED to be appropriate for the receiving system.
N.B. ASCII is the windows default and will corrupt non-text files.<<>br>
Default type .
| cr | Toggle carriage return stripping during ASCII type file retrieval.
Records may be terminated by a inefeed OR carriageReturn/lineFeed sequence during ASCII type file transfer.
When cr is on (the default), carriage returns are stripped from this sequence to
conform with the UNIX single linefeed record delimiter, if the remote system is a unix system.
Records on non-UNIX remote systems may contain single line feeds; when an ascii type transfer is made, these linefeeds
may be distinguished from a record delimiter only when cr is off.
| type [type-name] | Display or Set the file transfer type to ASCII (default), EBCDIC , image , tenex
| hash | Toggle hash-sign (# ) display for each 1024 byte data block transferred.
| tick | Toggle tick-mark (' ) display
| glob | Toggle filename expansion for mdelete , mget and mput .
Globbing for mput is done as in csh (Example ff* )
If globbing is off , the file name arguments are taken literally and not expanded.
For mdelete and mget , each remote file name is
expanded separately on the remote host and the lists are not merged.
Expansion of a directory name is likely to be
different from expansion of the name of an ordinary file: the
result depends on the remote operating system and ftp
host, and can be previewed by doing mls rmt-files
mget and mput don't transfer recursively.
Create a
tar --create --compress --verbose --preserve-permissions \
--file xxx.`date +log.%y%m%d%H%M`.taz *
archive of the subtree then in binary mode),
| prompt | Toggle interactive prompting.
During multiple file transfers allowng the user to selectively retrieve files. If prompting is turned off
(default is on), mget or mput will transfer all matching files,
and mdelete will delete all matching files without asking the user.
| help [command]
? Displays a list of commands or an informative message about the meaning of command.
| rhelp [command]
remote help Displays a list of commands or an informative message about the meaning of command as per the remote host.
| status | Show the current status of ftp.
Connected to Real-World-Systems.com.
No proxy connection.
Mode: stream; Type: ascii; Form: non-print; Structure: file
Verbose: on; Bell: off; Prompting: on; Globbing: on
Store unique: off; Receive unique: off
Case: off; CR stripping: on Ntrans: off Nmap: off
Hash mark printing: off; Use of PORT cmds: on
Tick counter printing: off
Macros:
birddata
init
Remote system type is UNIX.
Using binary mode to transfer files.
|
| remotestatus [file-name]
rstatus With no arguments, show status of remote host.
When file-name is specified, show status of file-name on remote host.
| system | Show the operating system running on the remote host.
| idle seconds] Most remote hosts will disconnect if there is no
activity after a number of seconds. Some permit setting the timeout.
| chmod mode file-name | Change the permission modes of file-name using rwxrwxrwx format for user:group:others format.
| umask newmask] Set the default umask on the remote host to
newmask. Files will be created with these permissions.
| !command [args]] Invoke an interactive shell on the local host.
macdef macro-name
Define the macro as macro-name .
A null line terminates macro input mode.
A $ followed by a number is replaced by the corresponding
argument on the macro invocation line.
$i causes the macro to loop. On the first pass $i is
replaced by the first argument on the macro invocation command line, on the second pass it is replaced by the second
argument, and so on.
Use \ to prevent special treatment of $ .
Macro definitions are cleared when close is executed.
| $ macro-name args] |
Execute the macro defined with the macdef command (perhaps in the .netrc file). Arguments are passed to the macro unglobbed.
| |
| runique | Toggle receiving unique filenames.
Helpful when get is used without specifying a local filename.
If a file already exists a ".1" is appended to the name. If that filename exsts, a ".2"
appended … . after ".99", an error message is
printed, and the transfer does not take place.
runique will not affect local files generated from a shell command .
The default is off.
| sunique | Toggle storing of files on remote under unique file names.
Helpful when pt is used without specifying a remote filename.
Default off.Remote ftp host must support ftp protocol STOU command for successful completion.
case | Toggle file name case mapping during mget . When case is on (default is off), remote computer file names with all letters in upper case are written in the local directory with the letters mapped to lower case.
| ntransinchars [outchars]]
Set or unset the filename character translation mechanism.
This command is useful when connecting to a remote
computer with different file naming conventions.
If no arguments are specified, the filename character translation mechanism is unset.
If arguments are specified, characters in remote filenames are translated during mput and put issued without a specified remote target filename, characters in
local filenames are translated during mget and get
commands issued without a specified local target filename.
Characters in a filename matching a character in inchars are
replaced with the corresponding character in outchars.
If the characters position in inchars is longer than the length
of outchars, the character is deleted from the file name.
example:
ntrans . _
causes DOTs in a filename to be changed to underscores.
| nmapinpattern outpattern]
Set or unset the filename mapping mechanism.
This command is useful when connecting to a remote computer with different file naming conventions or practices.
If no arguments are specified, the filename mapping mechanism is unset.
If arguments are specified, remote filenames are mapped during
mput and put issued without a specified
remote target filename and
local filenames are mapped during mget and get
issued without a specified local target filename.
Inpattern is a template for incoming filenames
(already processed according to ntrans and case ).
Variable templating is accomplished by including
the sequences $1, $2, …, $9 in inpattern.
Use \ to prevent this special treatment of the $ character. All
other characters are treated literally, and are used to
determine the nmap inpattern variable values.
For example, given inpattern $1.$2 and the remote file name "my.data" ,
$1 would have the value "my", and $2 would have the value "data".
The outpattern determines the resulting mapped filename. The sequences $1, $2, ...., $9 are replaced by
any value resulting from the inpattern template. The
sequence $0 is replace by the original filename.
The sequence seq1, seq2] is replaced by [seq1] if seq1
is not a null string; otherwise it is replaced by seq2 .
For example:
nmap $1.$2.$3 $1,$2].[$2,file]
For input filename "myfile.data" would yield the output filename "myfile.data"
For input filename "myfile.data.old" produces "myfile" "myfile.file" .
For input filename ".myfile". "myfile.myfile"
Spaces may be included in outpattern, as in the example:
nmap $1 sed "s/ *$//" > $1
Use \ to prevent special treatment of the $ , , [ , and , characters.
| proxy ftp-command
Execute ftp-command on a secondary connection.
Allows connection to two remote ftp hosts for transferring files between them.
After open ing one server,
the first proxy command should be proxy open , to establish the secondary connection.
proxy open will not define new macros during the auto-login process.
proxy close will not clear macro definitions.
proxy get and proxy mget transfer files from the primary host
to secondary host.
put , mput , and append transfer files from the host on the secondary connection to the host
Third party file transfers depend upon support of the ftp protocol PASV command by
the host on the secondary control connection.
quote arg1 arg2 ... The arguments are sent, verbatim, to the remote host.
| site arg1 arg2 ...
The arguments are sent, verbatim, to the remote host as a SITE command.
| reset | Clear reply queue. This command re-synchronizes command/reply sequencing with the remote host.
| restart marker get or put at the indicated marker. On UNIX systems, marker is a byte offset into the file.
| sendport | Toggle the use of PORT .
By default, ftp attempts to use a PORT command for each data transfer.
This can reduce delays when performing multiple file transfers.
When disabled, no attempt will be made to use PORT commands for each data transfer.
passive
| bell | after each file transfer command is completed.
| verbose | Toggle verbose mode. In verbose mode, responses from the
FTP host are displayed as well as statistics regarding the efficiency of the transfer .
By default, verbose is on.
| trace | Toggle packet tracing.
| debug debug-value] Toggle debugging mode. If an optional debug-value is specified it is used to set the debugging level. When debugging
is on, ftp prints each command sent to the remote host,
preceded by the string -->
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |