• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

ftp

ftp

ftp File transfer program.
ftp [-dgintv] [<hostname> [<port>]]

The remote host with which ftp is to communicate can be specified on the command line. Done this way, ftp immediately tries to establish a connection with the remote host. Otherwise, ftp enters its command interpreter mode, awaits commands from the user, and displays the prompt ftp>.
-d Enables debugging.
-g Disables filename globbing.
-i Turns off interactive mode when transferring multiple files.
-n Does not attempt auto-login upon initial connection. If auto-login is not disabled, ftp checks for a .netrc file in the user's directory for an entry describing an account on the remote machine. If no entry is available, ftp prompts for the login name on the remote machine (defaults to the login name on the local machine), and if necessary, prompts for a password.
-t Enables packet tracing.
-v Enables verbose mode. Default if input is from a terminal. Shows all responses from the remote server as well as transfer statistics.
When ftp is in its command interpreter mode awaiting instructions from the user, there are many commands that the user may issue. Some of them include:
ascii Sets the file transfer type to network ASCII. Although this is supposed to be the default, it is not uncommon for an ftp server to indicate that binary is its default.
binary Sets the file transfer type to support binary image transfer.
bye Terminates the ftp session and exits ftp. An end of file also terminates the session and exits.
quit Same as bye.
cd <remote_directory> Changes the current working directory on the remote host to <remote_directory>.
cdup Changes the current working directory on the remote host to the parent directory.
close Terminates the ftp session with the remote host and returns to the command interpreter.
disconnect Same as close.
dir [<remote-directory>
[<local_file>]]

Prints a listing of the directory on the remote machine.Most Unix systems produce an ls -l output. If <remote_directory> is not specified, the current directory is assumed. If <local_file> is not specified, or is -, the output is sent to the terminal.
ftp <hostname> [<port>] Same as open.
open <hostname> [<port>] Attempts to establish an ftp connection on <hostname> at <port>, if <port> is specified.
glob Toggles filename expansion for mdelete, mget, and mput. If globbing is turned off, filename arguments are taken literally and not expanded.
delete <remote_file> Deletes the specified <remote_file> on the remote machine.
mdelete <remote_files> Deletes the specified <remote_files> on the remote machine.
get <remote_file> [<local-file>] Downloads <remote_file> from the remote machine to the local machine. If <local_file> is not specified, the file is also saved on the local machine with the name <remote_file>.
recv <remote_file> [<local_file>] Same as get.
mget <remote_files> Downloads the specified <remote_files>.
put <local_file> [<remote_file>] Uploads the specified <local_file> to the remote host. If <remote-_file> is not specified, the file as saved on the remote host with the name <local_file>.
send <local_file> [<remote_file>] Same as put.
mput <local_files> Uploads the specified <local_files>.
msend Same as mput.
help [<command>] Displays a message describing <command>. If <command> is not specified, a listing of known commands is displayed.
? Same as help.
lcd <directory> Changes the working directory on the local machine. If <directory> is not specified, the user's home directory is used.
ls [<remote_directory>
[<local_file>]]

Prints a list of the files in a directory on the remote machine. If <remote_directory> is not specified, the current working directory is assumed. If <local_file> is not specified or is -, the output is printed to a terminal. Note that if nothing is listed, the directory might only have directories in it. Try ls -l or dir for a complete listing.
mkdir <directory> Makes the specified <directory> on the remote machine.
rmdir <directory> Removes the specified <directory> from the remote machine.
passive Toggles passive mode. If passive mode is turned on (off by default), the ftp client sends a PASV command for data connections rather than a PORT command. PASV command requests that the remote server open a port for the data connection and return the address of that port. The remote server listens on that port and the client then sends data to it. With the PORT command, the client listens on a port and sends that address to the remote host, who connects back to it. Passive mode is useful when ftping through a firewall. Not all ftp servers are required to support passive mode.
pwd Prints the current working directory on the remote host.
verbose Toggles verbose mode. Default is on. In verbose mode, all responses from the ftp server are shown as well as transfer statistics.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint