Guest User

Untitled

a guest
May 3rd, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # FTP LOGIN
  4. HOST='xx.xx.xx.xx'
  5. USER='xxxxx'
  6. PASSWORD='xxxx*'
  7.  
  8. # DISTANT DIRECTORY
  9. REMOTE_DIR='/Non_A_C'
  10.  
  11. #LOCAL DIRECTORY
  12. LOCAL_DIR='Non_A_C_LCL'
  13.  
  14. # RUNTIME!
  15. echo
  16. echo "Starting download $REMOTE_DIR from $HOST to $LOCAL_DIR"
  17. date
  18.  
  19. lftp -u "$USER","$PASSWORD" $HOST <<EOF
  20. # the next 3 lines put you in ftpes mode. Uncomment if you are having trouble connecting.
  21. # set ftp:ssl-force true
  22. # set ftp:ssl-protect-data true
  23. set ssl:verify-certificate no
  24. # transfer starts now...
  25. mirror -c -R $LOCAL_DIR $REMOTE_DIR;
  26. exit
  27. EOF
  28. echo
  29. echo "Transfer finished"
  30. date
Add Comment
Please, Sign In to add comment