FTP Commands Overview

  Command Short Description   Command Short Description  
! Run mdir Multiple directory listing
? Help mget Mulitiple get
append Append to a file mkdir Make directory
ascii Set ASCII transfer type mls Multiple listing
bell Toggle bell mput Multiple Put
binary Set binary trasfer type open Connect to FTP server
bye Terminate ftp session and exit prompt Toggle prompting
cd Change directory put Upload file
close Terminiate FTP session pwd Present working directory
debug Toggle debugging mode quit Terminate FTP session and quit
delete Delete file quote Send arbitrary FTP command
dir Directory listing recv Receive file
disconnect Terminate FTP session remotehelp Help from remote server
get Download file rename Rename file
glob Toggle glob rmdir Remove directory
hash Toggle hash # send Send one file
help Local help status Current status
lcd Change local directory trace Toggle packet tracing
literal Send arbitrary FTP command type Show file transfer type
ls List contects of remote directory user Connect as new user
mdelete Delete multiple files verbose Toggles verbose mode


!

Escapes to the shell (command prompt) to run the specified command on the local computer.
     ! command
Parameter
command - Specifies the command to run on the local computer. If command is omitted, the local command prompt is displayed; type exit to return to ftp.
[Back to top]


?

Displays descriptions for ftp commands. ? is identical to help.
     ? [command]
Parameter
command - Specifies the name of the command about which you want a description. If command is not specified, ftp displays a list of all commands.
[Back to top]


append

Appends a local file to a file on the remote computer using the current file type setting.
     append local-file [remote-file]
Parameters
local-file - Specifies the local file to add.
remote-file - Specifies the file on the remote computer to which local-file will be added. If remote-file is omitted, the local filename is used for the remote filename.
[Back to top]


ascii

Sets the file transfer type to ASCII, the default.
     ascii
Note
FTP supports two file transfer types, ASCII and binary image. ASCII should be used when transferring text files. See also binary.

In ASCII mode, character conversions to and from the network standard character set are performed. For example, end-of-line characters are converted as necessary, based on the target operating system.
[Back to top]


bell

Toggles a bell to ring after each file transfer command is completed. By default, the bell is off.
     bell
[Back to top]


binary

Sets the file transfer type to binary.
     binary
Note
FTP supports two file transfer types, ASCII and binary image. Binary should be used when transferring executable files. In binary mode, the file is moved byte-by-byte. See also ascii.
[Back to top]


bye

Ends the FTP session with the remote computer and exits ftp.
     bye
[Back to top]


cd

Changes the working directory on the remote computer.
     cd remote-directory
Parameter
remote-directory - Specifies the directory on the remote computer to change to.
[Back to top]


close

Ends the FTP session with the remote server and returns to the command interpreter.
     close
[Back to top]


debug

Toggles debugging. When debugging is on, each command sent to the remote computer is printed, preceded by the string --->. By default, debugging is off.
     debug
[Back to top]


delete

Deletes files on remote computers.
     delete remote-file
Parameter
remote-file - Specifies the file to delete.
[Back to top]


dir

Displays a list of a remote directory's files and subdirectories.
     dir [remote-directory] [local-file]
Parameters
remote-directory - Specifies the directory for which you want to see a listing. If no directory is specified, the current working directory on the remote computer is used.
local-file - Specifies a local file to store the listing. If not specified, output is displayed on the screen.
[Back to top]


disconnect

Disconnects from the remote computer, retaining the ftp prompt.
     disconnect
[Back to top]


get

Copies a remote file to the local computer using the current file transfer type.
     get remote-file [local-file]
Parameters
remote-file - Specifies the remote file to copy.
local-file - Specifies the name to use on the local computer. If not specified, the file is given the remote-file name.
[Back to top]


glob

Toggles filename globbing. Globbing permits use of wildcard characters in local file or path names. By default, globbing is on.
     glob
[Back to top]


hash

Toggles hash-sign (#) printing for each data block transferred. The size of a data block is 2048 bytes. By default, hash mark printing is off.
     hash
[Back to top]


help

Displays descriptions for ftp commands.
     help [command]
Parameter
command - Specifies the name of the command about which you want a description. If command is not specified, ftp displays a list of all commands.
[Back to top]


lcd

Changes the working directory on the local computer. By default, the working directory is the directory in which ftp was started.
     lcd [directory]
Parameter
directory - Specifies the directory on the local computer to change to. If directory is not specified, the current working directory on the local computer is displayed.
[Back to top]


literal

Sends arguments, verbatim, to the remote FTP server. A single FTP reply code is expected in return.
     literal argument [ ...]
Parameter
argument - Specifies the argument to send to the FTP server.
[Back to top]


ls

Displays an abbreviated list of a remote directory's files and subdirectories.
     ls [remote-directory] [local-file]
Parameters
remote-directory - Specifies the directory for which you want to see a listing. If no directory is specified, the current working directory on the remote computer is used.
local-file - Specifies a local file to store the listing. If not specified, output is displayed on the screen.
[Back to top]


mdelete

Deletes files on remote computers.
     mdelete remote-files [ ...]
Parameter
remote-files - Specifies the remote files to delete.
[Back to top]


mdir

Displays a list of a remote directory's files and subdirectories. Mdir allows you to specify multiple files.
     mdir remote-files [ ...] local-file
Parameters
remote-files - Specifies the directory for which you want to see a listing. Remote-files must be specified; type "-" (no quotes) to use the current working directory on the remote computer.
local-file - Specifies a local file to store the listing. Type "-" (no quotes) to display the listing on the screen.
[Back to top]


mget

Copies remote files to the local computer using the current file transfer type.
     mget remote-files [ ...]
Parameter
remote-files - Specifies the remote files to copy to the local computer.
[Back to top]


mkdir

Creates a remote directory.
     mkdir directory
Parameter
directory - Specifies the name of the new remote directory.
[Back to top]


mls

Displays an abbreviated list of a remote directory's files and subdirectories.
     mls remote-files [ ...] local-file
Parameters
remote-files - Specifies the files for which you want to see a listing. Remote-files must be specified; type - to use the current working directory on the remote computer.
local-file - Specifies a local file to store the listing. Type - to display the listing on the screen.
[Back to top]


mput

Copies local files to the remote computer using the current file transfer type.
     mput local-files [ ...]
Parameter
local-files - Specifies the local files to copy to the remote computer.
[Back to top]


open

Connects to the specified FTP server.
     open computer [port]
Parameters
computer - Specifies the remote computer to connect to. Computer can be specified by IP address or computer name (a DNS or HOSTS file must be available). If auto-login is on (default), FTP also attempts to automatically log the user in to the FTP server (see Ftp to disable auto-login).
port - Specifies a port number to use to contact an FTP server.
[Back to top]


prompt

Toggles prompting to force interactive prompting on multiple commands. Ftp prompts during multiple file transfers to allow you to selectively retrieve or store files; mget and mput transfer all files if prompting is turned off. By default, prompting is on.
     prompt
[Back to top]


put

Copies a local file to the remote computer using the current file transfer type.      put local-file [remote-file]
Parameters
local-file - Specifies the local file to copy.
remote-file - Specifies the name to use on the remote computer. If not specified, the file is given the local-file name.
[Back to top]


pwd

Displays the current directory on the remote computer.
     pwd
[Back to top]


quit

Ends the FTP session with the remote computer and exits ftp.
     quit
[Back to top]


quote

Sends arguments, verbatim, to the remote FTP server. A single FTP reply code is expected in return. Quote is identical to literal.
     quote argument [ ...]
Parameter
argument - Specifies the argument to send to the FTP server.
[Back to top]


recv

Copies a remote file to the local computer using the current file transfer type. Recv is identical to get.
     recv remote-file [local-file]
Parameters
remote-file - Specifies the remote file to copy.
local-file - Specifies the name to use on the local computer. If not specified, the file is given the remote-file name.
[Back to top]


remotehelp

Displays help for remote commands.
     remotehelp [command]
Parameter
command - Specifies the name of the command about which you want help. If command is not specified, ftp displays a list of all remote commands.
[Back to top]


rename

Renames remote files.
     rename filename newfilename
Parameters
filename - Specifies the file you want to rename.
newfilename - Specifies the new filename.
[Back to top]


rmdir

Deletes a remote directory.      rmdir directory
Parameter
directory - Specifies the name of the remote directory to delete.
[Back to top]


send

Copies a local file to the remote computer using the current file transfer type. Send is identical to put.
     send local-file [remote-file]
Parameters
local-file - Specifies the local file to copy.
remote-file - Specifies the name to use on the remote computer. If not specified, the file is given the local-file name.
[Back to top]


status

Displays the current status of FTP connections and toggles.
     status
[Back to top]


trace

Toggles packet tracing; trace displays the route of each packet when running an ftp command.
     trace
[Back to top]


type

Sets or displays the file transfer type.
     type [type-name]
Parameter
type-name - Specifies the file transfer type; the default is ASCII. If type-name is not specified, the current type is displayed.

Notes
FTP supports two file transfer types, ASCII and binary image.
ASCII should be used when transferring text files. In ASCII mode, character conversions to and from the network standard character set are performed. For example, end-of-line characters are converted as necessary, based on the destination's operating system.
Binary should be used when transferring executable files. In binary mode, the file is moved byte-by-byte.

See Also :
  • ascii
  • binary
  • [Back to top]


    user

    Specifes a user to the remote computer.
         user user-name [password] [account]
    Parameters
    user-name - Specifies a user name with which to log in to the remote computer.
    password - Specifies the password for user-name. If not specified, but required, ftp prompts for the password.
    account - Specifies an account with which to log on to the remote computer. If account is not specified, but required, ftp prompts for the account.
    [Back to top]


    verbose

    Toggles verbose mode. If on, all ftp responses are displayed; when a file transfer completes, statistics regarding the efficiency of the transfer are also displayed. By default, verbose is on.
         verbose
    [Back to top]