FTP automatic login upload download file

Source: Internet
Author: User

(1) FTP automatic batch download file

# # # # # # #从ftp服务器上的/DATA/LOCALACC to the local/data/localacc#### #!/bin/Bash FTP-n<<!//-N is an automatic login that does not use FTPOpen10.0.129.170      //Open Host[port]: establishes the specified FTP server connection, can specify the connection portUser SFHC sfhc1234//user username password: to indicate to the remote host their identity, require a password, you must enter a password, such as: User anonymous [email protected]Binary//binary: Sets the file transfer mode to binary, which defaults to ASCII. Binary mode does not do any processing of the data, and ASCII mode converts the carriage return line to the return character of the machine. Cd/data/localacc//CD Remote-dir: Enter the remote host directory Remote-dirLcd/data/localacc//LCD local-dir: Switch the local working directory to Local-dirPrompt//prompt: Set the interactive prompt for multiple file transfers (default is prompt, bulk download prompts in each file, enter Y to transfer the next file, prompt can cancel interactive hints)Mget *.gz//mget remote-files: Download multiple remote filesClose//Close: Interrupts the FTP session with the remote serverBye//Bye: Exiting the ftp session!//!: Perform interactive shell,exit on local machine back to FTP environment


(2) FTP automatic batch upload file

# # # #本地的/data/localacc####  #!/bin/bash  -n<<!    on/DATA/LOCALACC to FTP server 10.0. 129.171   user SFHC sfhc1234  binary  hash                       //Hash: 1024 bytes per transfer, showing a hash symbol (#) cd/data/localacc  /data/localacc  prompt  * */                  /  Mput local-files: Transfer multiple files to the remote host close  bye  !  

FTP automatic login upload download file

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.