Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] find files and put with ncftp



Hello,

On Wed, 07 Mar 2007 00:54:12 +0900, Nguyen Vu Hung <vuhung16plus@??> wrote:

I wanted to find all files in a folder, then use ncftp to put the
file(s) to a remote ftp server. Here is the script:

find /home/vuhung/public_html/aoc/aoclife.ddo.jp/recs/aoc-recs/ -type
f -mtime -2 | xargs \
        ncftp -u"$FTPU" -p"$FTPP" $FTPH<<EOF \
        cd ~/public_html/aoc/recs/aoc-recs/ \
        put "The file found in find command" \
        quit \
        EOF
exit

Take a look at ncftpput. If you "man" it you will see one of the options reads the files from STDIN.

So this should probably work:

"find /home/vuhung/public_html/aoc/aoclife.ddo.jp/recs/aoc-recs/ -type
f -mtime -2 | ncftpput -u"$FTPU" -p"$FTPP" -c $FTPH
~/public_html/aoc/recs/aoc-recs/"


Zev


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links