Mailing List Archive


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

Re: [tlug] find files and put with ncftp



On Wed, 07 Mar 2007 20:39:52 +0900, Nguyen Vu Hung <vuhung16plus@??> wrote:


The man page writes and example:

# The following example shows how to make a backup
# and store it on a remote machine:
$ tar cf - / | ncftpput -c sonic.sega.co.jp /usr/local/backup.tar

in my case, the stdin contains filenames, not contents of the files. I
know I can cat it and then ncftpput, but we lose the file name:

That is annoying at first, but probably very useful at other times.

find -options | xargs cat - | ncftput -options remote_host remote_file

how to make remote_file equals to the name of the file it is transfering?

Assuming you are not copying files in subdirectories, it might be as simple as:

find -options | xargs ncftpput -options remote_host

If not you could brute force it with:
find -options -exec ncftpput -options remote_host {} \;

Zev


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links