Mailing List Archive


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

Re: [tlug] find files and put with ncftp



On Thu, 08 Mar 2007 01:45:01 +0900, Nguyen Vu Hung <vuhung16plus@??> wrote:

On 3/7/07, Zev Blut <zb@??> wrote:

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 {} \;

It didn't work ( I tested ). As I said in previous email:

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

I am not talking about the -c option. You should be able to do what you want with ncftpput. Here is a sample of a test I just made.

"
z@?? ~/ncftp $ ls
bar.txt  baz.txt  foo.txt

z@?? ~/ncftp $ find ./ -type f | xargs ncftpput -u xxx -p xxxx ftpsrv ./
./foo.txt: 12.00 B 294.86 B/s
./bar.txt: 448.00 B 11.53 kB/s
./baz.txt: 32.00 B 833.36 B/s
"


Since you mentioned that you have spaced files then a brute force way should
work like so:


"
z@?? ~/ncftp $ ls
Spaced File.txt bar.txt baz.txt foo.txt
z@?? ~/ncftp $ find ./ -type f -exec ncftpput -u xxx -p xxx ftpsrv ./ "{}" \;
./foo.txt: 12.00 B 295.42 B/s
./bar.txt: 448.00 B 10.80 kB/s
./baz.txt: 32.00 B 790.40 B/s
./Spaced File.txt: 4.00 B 98.66 B/s
"


Zev


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links