shell 下 ftp自动上传文件的脚本

#!/bin/sh
export file=123456
ftp -n<<EOF
open yourhost
user backup ******
binary
cd /home/backup
lcd /home/stuff/backup
prompt
put ${file}.txt
close
bye
EOF

Written by gegewan on 三月 18th, 2009 with no comments.
Read more articles on FreeBSD/Linux.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .