Skip to Content

auto ftp upload and download

Sometimes we need to upload and download files from ftp, waiting a file complete is a terrible thing. Let's do ot automatically!

Scripts to download files from Server:

!/bin/bash
ftp -v -n 192.168.1.171
user guest 123456
binary
cd /home/data
lcd /home/databackup
prompt
mget *
close
bye

Scripts to upload files to FTP server:

#!/bin/bash
ftp -v -n 192.168.1.171 << END
user guest 123456
binary
hash
cd /home/data
lcd /home/databackup
prompt
mput *
bye
END

-- EOF-TRUEVUE --

Comments

很有用的內容 謝謝分享...

很有用的內容
謝謝分享...

Post new comment

The content of this field is kept private and will not be shown publicly.