Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common commands of ftp in Linux system

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail what ftp commands are commonly used in the Linux system. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

FTP (File transfer Protocol) is a set of standard protocols for file transfer on the network, which allows users to communicate with another host by means of file operations (such as file addition, deletion, modification, query, transfer, etc.).

1. Connect to ftp server format: ftp [hostname | ip-address] a) enter under the linux command line:

Ftp 192.168.1.1

B) the server asks for your user name and password, enter the user name and the corresponding password respectively, and wait for the authentication to pass.

two。 Download files usually use the commands get and mget. A) get format: get [remote-file] [local-file] transfers files from the remote host to the local host. To get / usr/your/1.htm on a remote server,

Ftp > get / usr/your/1.htm 1.htm (enter)

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 / usr/your/ on the server, then

Ftp > cd / usr/your/ftp > mget. (enter)

At this point, there will be a prompt for each file downloaded. If you want to get rid of the hint, then in mget. Execute before the command: prompt off

Note: the files are downloaded to the current directory of the linux host. For example, for ftp commands run under / usr/my, the files are downloaded to / usr/my.

3. Upload file a) put format: put local-file [remote-file] transfers a local file to the remote host. If you want to transfer the local 1.htm to the remote host / usr/your and rename it to 2.htm

Ftp > put 1.htm / usr/your/2.htm (enter)

B) mput format: mput local-files transfers a batch of files from the local host to the remote host. If you want to upload all html files under the local current directory to the server / usr/your/

Ftp > cd / usr/your (enter) ftp > mput * .htm (enter)

Note: all the uploaded files come from the current directory of the host. For example, for a ftp command run under / usr/my, only the file linux under / usr/my will be uploaded to the server / usr/your.

4. Disconnect bye: disconnect from the server.

Ftp > bye (enter)

This is the end of this article on "what are the common ftp commands in the Linux system?" I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report