auto ftp upload and download

  • warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_imagecache_menu_access_public_files' not found or invalid function name in /var/www/drupal-6.28/includes/menu.inc on line 454.
  • warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'views_access' not found or invalid function name in /var/www/drupal-6.28/includes/menu.inc on line 454.
  • warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'views_access' not found or invalid function name in /var/www/drupal-6.28/includes/menu.inc on line 454.
  • warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'views_access' not found or invalid function name in /var/www/drupal-6.28/includes/menu.inc on line 454.

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

Comments

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

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