In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how ftp uploads data to the server under linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
LinuxftpFTP is the standard file transfer protocol of ARPANet, and this network is the predecessor of Internet today. Usually we use the ftp command, mainly to upload and download files, ftp login users are generally virtual users, because this is for security reasons.
Syntax: ftp [- dignv] [host name or IP address]
Parameters:
-v shows the instruction execution process.
-n does not use automatic login.
-g turns off the extension of the local host file name to support special characters.
-I turn off the interactive mode without asking any questions.
-d shows the instruction execution process in detail to facilitate debugging or analysis of program execution.
Example: login 124.16.144.120, command
[root@localhostlane6] $ftp124.16.144.120
Connectedto124.16.144.120.
220 (vsFTPd2.0.5)
530PleaseloginwithUSERandPASS.
530PleaseloginwithUSERandPASS.
KERBEROS_V4rejectedasanauthenticationtype
Name (124.16.144.120:root): anonymous# user name
331Pleasespecifythepassword.# user password
Password:
230Loginsuccessful.
RemotesystemtypeisUNIX.
Usingbinarymodetotransferfiles.
Get and mget commands are usually used to download files
A) get
Format: get [remote-file] [local-file]
Transfer files from the remote host to the local host.
To get c:\ a\ 1.jpg on the server, then
Ftp > get/a/1.jpg1.jpg (enter)
B) mget
Format: MGET [remote-files]
Receive a batch of files from the remote host to the local host.
To get all the files under E:\ a\ on the server,
Ftp > cd/a
Ftp > mget*.* (enter)
Enter the prompt command under ftp, but batch acquisition is not prompted one by one.
Note: the files are downloaded to the current directory of the linux host. For example, for ftp commands run under / root/web, the files are downloaded to / root/web.
3. Upload files
A) put
Format: putlocal-file [remote-file]
Transfer a local file to the remote host.
If you want to transfer the local 1.jpg to the remote host c:\ an and rename it to 2.gif
Ftp > put1.jpg/a/2.gif (enter)
B) mput
Format: mputlocal-files
Transfer a batch of files from the local host to the remote host.
To upload all bmp files under the local current directory to the server c:\ a
Ftp > cd/a (enter)
Ftp > mput*.jpg (enter)
Note: all the uploaded files come from the current directory of the host. For example, for a ftp command run under / root/web, only the file linux under / root/web will be uploaded to the server c:\ a.
Linux tutorial: using ftp to automatically download and upload Files in Linuxshell
FTP automatically logs in to download files in bulk
From / home/data on ftp server 192.168.1.171 to local / home/databackup
! / bin/bash
Ftp-v-n192.168.1.171
Userguest123456
Binary
Cd/home/data
Lcd/home/databackup
Prompt
Mget*
Close
Bye
FTP automatically logs in to upload files in bulk
From / home/data on ftp server 192.168.1.171 to local / home/databackup
#! / bin/bash
Ftp-v-n192.168.1.171
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.