
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] find files and put with ncftp
On 3/8/07, Zev Blut <zb@??> wrote:
z@?? ~/ncftp $ ls
Spaced File.txt bar.txt baz.txt foo.txt
z@?? ~/ncftp $ find ./ -type f -exec ncftpput -u xxx -p xxx ftpsrv ./ "{}"\;
I can't stop it from running. Thanks
FYI, the main server is
http://yasumin.ddo.jp:8080/~vuhung/aoc/aoclife.ddo.jp/recs/aoc-recs/
---------
It is the world's biggest AOC
( Age of Empires - a realtime strat. game by Ensemble Studio ),
my friends and myself upload recorded games to it everyday.
I don't want to repeat one more upload: doing it a little smarter
----------
and I want to mirror it to:
http://70.86.90.218/~aoccom/aoc/recs/aoc-recs/
by making the script like following and add it to crontab,
I can "sycn" files I upload to the mirror from host.
1. "mirror.aoclife.to.aoccom.sh"
FTPU=""
FTPP=""
FTPH=""
INDIR="/home/vuhung/public_html/aoc/aoclife.ddo.jp/recs/aoc-recs/"
OUTDIR="/public_html/aoc/recs/aoc-recs/"
LOGDIR="/home/vuhung/public_html/aoc/aoclife.ddo.jp/misc/log/"
find $INDIR -type f -mtime -1 -exec ls -lht {} \; >
$LOGDIR/uploaded.`date -I`.log
find $INDIR -type f -mtime -1 -exec ncftpput -u$FTPU -p$FTPP $FTPH
$OUTDIR "{}" \; &> $LOGDIR/uploaded.`date -I`.log.log
2. crontab ( edit with crontab -e )
aoclife:~/sbin# crontab -l
10 3 * * * /root/sbin/mirror.aoclife.to.aoccom.sh
3. Optional, for user's convinience, list folders and new list on top
vuhung@??:~/public_html/aoc$ cat .htaccess
IndexOptions +FoldersFirst +NameWidth=80
IndexOrderDefault Descending Date
vuhung@??:~/public_html/aoc$
--
Best Regards,
Nguyen Hung Vu
vuhung16plus{remove}@??
VIQR Standard: http://vi.i18n.kde.org/viqr
http://www.flickr.com/photos/vuhung/tags/fav/
Home |
Main Index |
Thread Index