Linux FTP commands

Source: Internet
Author: User
Tags ftp commands ftp connection remote ftp server
For details about FTP commands in Linux-Linux Enterprise applications-Linux server applications, see the following. FTP>! Exit from the ftp subsystem to the shell.
FTP>? Show ftp command description .? Same as help.
Format :? [Command]
Note: [command] specifies the name of the command that requires help. If no command is specified, ftp displays a list Of all commands.

FTP> append: attaches a local file to a file on a remote computer using the current file type setting.
Format: append local-file [remote-file]
Note: local-file specifies the local file to be added.
Remote-file specifies the file on the remote computer where the local-file is to be added. If remote-file is omitted, the local file name is used as the remote file name.

FTP> ascii sets the file transfer type to the default ASCII.
Note: FTP supports two file transfer types: ASCII code and binary image. ASCII should be used for transferring text files.

FTP> bell switch to ring the bell after each file transfer command is completed. By default, ringtones are disabled.

FTP> binary (or bi) sets the file transfer type to binary.

FTP> bye (or by) ends the FTP session with the remote computer and exits ftp.

FTP> cd to change the working directory on the remote computer.
Format: cd remote-directory
Description: remote-directory specifies the directory on the remote computer to be changed.

FTP> close ends the FTP session with the remote server and returns the command interpreter.

FTP> debug switch debugging. When debugging is enabled, every command sent to the remote computer is printed, followed by the string "> ". Debugging is disabled by default.

FTP> delete files on the remote computer.
Format: delete remote-file
Description: remote-file specifies the file to be deleted.

FTP> dir: displays the list of remote directory files and subdirectories.
Format: dir [remote-directory] [local-file]
Description: remote-directory specifies the directory to view its list. If no directory is specified, the current working directory on the remote computer is used. Local-file specifies the Local file to store the list. If not specified, the output is displayed on the screen.

FTP> disconnect is disconnected from the remote computer. Keep the ftp prompt.

FTP> get copies remote files to the local computer using the current file conversion type.
Format: get remote-file [local-file]
Description: remote-file specifies the remote file to be copied.
Local-file specifies the name to be used on the Local computer. If not specified, the file is named remote-file.

FTP> glob switch file name combination. A combination of wildcard characters (* And?) can be used in an internal file or path name ?). By default, a combination is enabled.

FTP> hash switches the digital signature (#) Printing of each transmitted data block. The data block size is 2048 bytes. By default, hashes are disabled.
FTP> help displays ftp command instructions.
Format: help [command]
Note: The command specifies the name of the command that requires instructions. If no command is specified, ftp displays a list Of all commands.

FTP> LCD changes the working directory on the local computer. By default, the working directory is the directory for starting ftp.
Format: LCD [directory]
Note: directory specifies the directory on the local computer to be changed. If no directory is specified, the current working directory on the local computer is displayed.

FTP> literal sends the parameter to the remote FTP server verbatim. A single FTP response code is returned.
Format: literal argument [...]
Description: argument specifies the parameter to be sent to the FTP server.

FTP> ls displays the abbreviation list of remote directory files and subdirectories.
Format: ls [remote-directory] [local-file]
Description: remote-directory specifies the directory to view its list. If no directory is specified, the current working directory on the remote computer is used. Local-file specifies the local file to store the list. If not specified, the output is displayed on the screen.

FTP> mdelete Delete: delete files on a remote computer.
Format: mdelete remote-files [...]
Description: remote-files indicates the remote file to be deleted.

FTP> mdir: displays the list of remote directory files and subdirectories. You can use mdir to specify multiple files.
Format: mdir remote-files [...] local-file
Description: remote-files specifies the directory to view the list. You must specify remote-files. Type-use the current working directory on the remote computer.
Local-file specifies the local file to restore the list. Type-display the list on the screen.

FTP> mget copies remote files to the local computer using the current file transfer type.
Format: mget remote-files [...]
Description: remote-files indicates the remote file to be copied to the local computer.

FTP> mkdir: Create a remote directory.
Format: mkdir directory
Description: directory specifies the name of the new remote directory.
FTP> mls displays the abbreviation list of remote directory files and subdirectories.

Format: mls remote-files [...] local-file
Description: remote-files indicates the object to be viewed in the list. You must specify remote-files;
Type-use the current working directory on the remote computer.
Local-file specifies the local file to store the list. Type-to display the list on the screen.

FTP> mput copies local files to a remote computer using the current file transfer type.
Format: mput local-files [...]
Note: local-files indicates the local file to be copied to the remote computer.
FTP> open connects to the specified FTP server.
Format: open computer [port]
Description: Specifies the remote computer to connect. You can specify a computer by IP address or computer name (DNS or host files must be available ). If Automatic Logon is enabled (default), ftp also attempts to automatically log on to the FTP server port to specify the port number used to contact the FTP server.

FTP> prompt switch prompt. If you disable the message when mget and mput send all files, Ftp will prompt you to allow you to selectively retrieve or store files during multi-file transfer. By default, the prompt is
Open.

FTP> put copies local files to a remote computer using the current file transfer type.
Format: put local-file [remote-file]
Note: local-file specifies the local file to be copied.
Remote-file specifies the name to be used on the remote computer. If not specified, the file is named local-file.

FTP> pwd: displays the current directory on the remote computer.

FTP> quit ends the FTP session with the remote computer and exits ftp.

FTP> quote sends the parameter to the remote FTP server verbatim. A single FTP response code is returned.
Quote is the same as literal.
Format: quote argument [...]
Description: argument specifies the parameter to be sent to the FTP server.

FTP> recv copies remote files to the local computer using the current file transfer type. Recv is the same as get.
Format: recv remote-file [local-file]
Description: remote-file specifies the remote file to be copied.
Local-file specifies the name to be used on the local computer. If not specified, the file is named remote-file.

FTP> remotehelp: displays Remote Command help.
Format: remotehelp [command]
Note: The command specifies the name of the command that requires help. If no command is specified, ftp displays a list Of all remote commands.

FTP> rename: rename the remote file.
Format: rename filename newfilename
Note: filename specifies the file to be renamed. Newfilename specifies the new file name.

FTP> rmdir Delete the remote directory.
Format: rmdir directory
Description: directory specifies the name of the remote directory to be deleted.

FTP> send copies local files to a remote computer using the current file transfer type. Send is the same as put.
Format: send local-file [remote-file]
Note: local-file specifies the local file to be copied. Remote-file specifies the name to be used on the remote computer. If not specified, the file is named local-file.

FTP> status: displays the current status of FTP connection and switch.

FTP> trace switch packet tracing. The Trace displays the route of each packet when running the ftp command.

Set FTP> type or display the file transfer type.
Format: type [type-name]
Description: type-name specifies the file transfer type. The default value is ascii. If no type-name is specified, the current type is displayed.

FTP> user specifies the user of the remote computer.
Format: user username [password] [account]
Description: user-name indicates the user name used to log on to the remote computer. Password specifies the password of user-name. If it is not specified but must be specified, the ftp will prompt you to enter the password.
Account specifies the account used to log on to the remote computer. If you do not specify an account but need to specify it, ftp will prompt you to enter an account.

FTP> verbose switch to verbose mode. If yes, all ftp responses are displayed. After the file is transferred, statistics related to the transfer efficiency are displayed. By default, verbose is enabled.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.