1024programmer News ftplinux pushes files_SSH under Linux uses FTP commands to upload files to another FTP space

ftplinux pushes files_SSH under Linux uses FTP commands to upload files to another FTP space

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 remote space FTP IP and port number , Enter

Then enter the user name and password according to the prompt !

ftp>lcd local working directory

ftp>cd remote directory

ftp>binary uses binary transmission

ftp> tick to turn on the byte counter during transmission , execute it again to turn it off

ftp>mput file

FTP> bye (or by) ends the session with the ftp command parameter in linux of the remote computer and exits the ftp command parameter in linux.

FTP> cd Changes the working directory on the remote computer.

FTP> get Copy the remote file to the local computer using the current file transfer 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 where the ftp command parameter in Linux is started.

Format :lcd [directory]

FTP>ls Displays an abbreviated listing of remote directory documents and subdirectories.

FTP >mdelete deletes files on the remote computer.

Format :mdelete remote-files […]

Description :remote-files specifies the remote files to be deleted.

FTP >mdir Display remote directory documents and subdirectory list. Multiple documents can be specified using mdir.

Format :mdir remote-files [ …] local-file

Description :remote-files specifies the directory to view the list. remote-files must be specified. Type – to use the current working directory on the remote computer.

1. Connect to the ftp server

Format :ftp [hostname | ip-address]

a) Enter &#xff1a under the linux command line ;ftp www.boluo.org

b) The server asks you for your username and password , enter your username and corresponding password respectively, wait for the authentication to pass.

2. Download files

Download files usually use the two commands get and mget:

a) get format:get [remote-file ] [local-file]

Transfer the file from the remote host to the local host.

If you want to get /ftp/1.rar on the server, then

ftp> get /ftp/1.rar 1.rar (Enter)

b) mget format :mget [remote-files]

From remote The host receives a batch of files to the local host.

If you want to get all the files under /ftp on the server, then

ftp> cd /ftp

ftp> mget *.* (Enter)

Note : files are downloaded to the current directory of the Linux host.

3. Upload files

a) put format :put local-file [remote-file]

Transmit a local file to the remote In the host.

If you want to transfer the local 1.zip to the remote host/ftp, and rename it to 1.rar

ftp> put 1.zip /ftp1.rar ( Enter)

b) mput format :mput local-files

Transfer a batch of files from the local host to the remote host.

For example Upload all rar files in the local current directory to the server/ftp

ftp> cd /ftp (enter)

ftp> mput *.rar (enter)

ftp> mput *.rar (enter)

ftp> p>

4. Disconnect

bye: Disconnect from the server.

Unlimited Stars, all rights reserved丨If not specified, all are original丨This website is authorized by BY-NC-SA agreement, please specify SSH under Linux to upload files to another FTP with FTP command space!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/ftplinux-pushes-files_ssh-under-linux-uses-ftp-commands-to-upload-files-to-another-ftp-space/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索