Mailing List Archive


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

[tlug] find files and put with ncftp



Hi all,

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

Here, FTPU is the username, FTPP is the hostname and FTPH is the
remote directory.

My problem is that I don't know how to pass the file that found from
the 'find' command to the 'put' command of ncftp.

# filenames may contain spaces

ncftp: latest
OS ( local ) : Debian, latest.

--
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

Home Page Mailing List Linux and Japan TLUG Members Links