shell 上传目录

#!/bin/bash
updir=/root/wav
todir=/
sss=`find $updir -type d -printf $todir/’%P\n’| awk ‘{if ($0 == “”)next;print “mkdir ” $0}’`
aaa=`find $updir -type f -printf ‘put %p %P \n’`
ftp -nv spetechcular.com <<EOF
user quantong quantong2013
type binary
prompt
$sss
cd $todir
$aaa
quit
EOF

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.