In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to upload FTP in bulk, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
The default file transfer method of FTP is based on ASCII code. If you want to transfer files in binary format, enter the bin command first, and then use the put or get command.
1. If you need to transfer all the files in a directory, use the mput or mget command instead of the put or get command.
Note: you need to use the prompt off command to turn off the interaction mode and avoid typing Y confirmation each time.
2. If you need to transfer files regularly, you can do so through scripts.
#! / bin/sh
Ftp-nopen xxx.xxx.xxx.xxx
User USERNAME PASSWORD
Binary
Prompt off
Cd / yourpath
Mput * .archive
Close
Bye
!
Add this script to crontab to achieve automatic transmission of timing ftp!
0 23 * * 6 / usr/local/chuanshu.sh
The above sentence means that ftp automatic transmission is performed every Saturday at 23: 00.
3. If there are too many files in a directory, it is not recommended that you upload the files in the whole directory in batches. First of all, the upload speed will be slow, and the files may be damaged. It is recommended that you first tar package and then upload this file package directly, and then decompress it.
Add: if you want to learn more about FTP commands, you can type
Ftp > help (enter)
View the command set:
Ascii: set to transfer files in ASCII mode (default)
Bell: alarm prompt every time a file transfer is completed
Binary: setting files to be transferred in binary mode
Bye: terminates the host FTP process and exits FTP management
Case: when ON, the file names copied with the MGET command are transferred to the local machine and all converted to lowercase letters
Cd: the same CD command as UNIX
Cdup: return to the previous directory
Chmod: change the file permissions of the remote host
Close: terminates the remote FTP process, returns to the FTP command state, and all macro definitions are deleted
Delete: delete files in the remote host
Dir [remote-directory] [local-file]: lists the files in the current remote host directory. If there is a local file, write the result to the local file
Get [remote-file] [local-file]: transfer from the remote host to the local host
Help [command]: interpretation of output commands
Lcd: change the working directory of the current local host. If default, change to the current user's HOME directory.
Ls [remote-directory] [local-file]: same as DIR
Macdef: define macro command
Mdelete [remote-files]: delete a batch of files
Mget [remote-files]: receives a batch of files from the remote host to the local host
Mkdir directory-name: set up a directory in the remote host
Mput local-files: transfers a batch of files from the local host to the remote host
Open host [port]: re-establish a new connection
Prompt: interactive prompt mode off on
Put local-file [remote-file]: transfer a local file to a remote host
Pwd: lists the current remote host directory
Quit: same as BYE
Recv remote-file [local-file]: same as GET
Rename [from] [to]: change the file name in the remote host
Rmdir directory-name: delete a directory from a remote host
Send local-file [remote-file]: same as PUT
Status: displays the status of the current FTP
System: displays the remote host system typ
User user-name [password] [account]: log in to the remote host again with a different user name
This is the end of the answer to the question about how to upload FTP in bulk. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
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.