Linux under SSH ftp command upload file details

Source: Internet
Author: User
Tags rar zip ssh port number ssh ftp

If there is no FTP prompt:-bash:ftp:command not found
Please install the FTP application first: Yum install FTP
#ftp 127.0.0.1 21 Enter the FTP IP and port number of the remote space, carriage return
Then enter the user name and password according to the prompts!
FTP>LCD Local working directory
FTP>CD Remote Directory
Ftp>binary using binary transmission
Ftp> tick the byte counter when the transmission is turned on, and then run it again to close
Ftp>mput file

Ftp> bye (or by) ends the ftp command parameter session in Linux on the remote computer and exits the ftp command parameter in Linux.

Ftp> the CD to change the working directory on the remote computer.

Ftp> get copies the remote document to the local computer using the current document conversion type.
Format: Get Remote-file [Local-file]

FTP >LCD Change the working directory on the local computer. By default, the working directory is the directory that starts the FTP command parameters in Linux.

Format: LCD [directory]

The FTP >ls displays an abbreviated list of remote directory documents and subdirectories.

FTP >mdelete Delete documents on a remote computer.
Format: Mdelete remote-files [...]
Description: remote-files Specifies the remote document to be deleted.

The FTP >mdir displays a list of remote directory documents and subdirectories. Ability to specify multiple documents using Mdir.
Format: Mdir remote-files [...] local-file
Description: remote-files Specifies the directory to view the list. Remote-files must be specified. Please type – Use the current working directory on the remote computer.

1, connect the FTP server

Format: FTP [hostname | ip-address]
A) on the Linux command line, enter: FTP www.boluo.org
b The server asks you username and password, enter user name and corresponding password separately, wait for authentication to pass.

2, download the file

The download file usually uses the get and mget two commands:

A) Get format: Get [Remote-file] [Local-file]
Transfers files from the remote host to the local host.
To get/ftp/1.rar on the server,
ftp> Get/ftp/1.rar 1.rar (carriage return)

b) mget format: mget [Remote-files]
Receives a batch of files from the remote host to the local host.
To get all the files under/ftp on the server,
Ftp> cd/ftp
ftp> mget *.* (carriage return)

Note: The files are downloaded to the Linux host's current directory.

3, Upload files

A) put format: Put Local-file [Remote-file]
Transfers a local file to the remote host.
If you want to transfer the local 1.zip to the remote host/ftp, and renamed to 1.rar
Ftp> put 1.zip/ftp1.rar (carriage return)

b) mput format: Mput local-files
Transfers a batch of files from a local host to a remote host.
To upload all the RAR files in the local current directory to the server/ftp
Ftp> cd/ftp (carriage return)
ftp> mput *.rar (carriage return)

4. Disconnect the connection

Bye: Interrupts the connection to the server.

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.