Difference between revisions of "Shell Script: Untuk FTP"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (New page: Kadangkala kita membutuhkan untuk upload secara automatis menggunakan FTP. Shell Script berikut akan membantu, Edit Script # vi myftp.sh isinya #! /bin/sh REMOTE='namamesin' USER=...) |
Onnowpurbo (talk | contribs) |
||
Line 23: | Line 23: | ||
quit | quit | ||
_FTP | _FTP | ||
− | + | ||
Jalankan di shell | Jalankan di shell |
Revision as of 10:48, 21 July 2009
Kadangkala kita membutuhkan untuk upload secara automatis menggunakan FTP. Shell Script berikut akan membantu,
Edit Script
# vi myftp.sh
isinya
#! /bin/sh REMOTE='namamesin' USER='namauser' PASSWORD='passworduser' FTPLOG='/tmp/ftplog' date >> $FTPLOG
ftp -n $REMOTE <<_FTP>>$FTPLOG quote USER $USER quote PASS $PASSWORD bin cd /myraid/dailyjpgs mput *.jpg quit _FTP
Jalankan di shell
# ./myftp.sh
Tambahkan di crontab jika dibutuhkan
# crontab -e