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

Re: Wput important question.



Ah, so you want to append something to the remote file. Seems as though this 
cannot be done directly, but there might be a few tricks.
If you have the contents of the remote images.txt on your local machine, you 
can simply do something like:
cat remote_images.txt images.txt > .tmpimages.txt
mv .tmpimages.txt remote_images.txt
wput remote_images.txt ftp://albert:albert@172.16.100.108/images.txt

So you append locally and wput will upload only the append data.
If you don't have the contents of the remote file, you can use some scripting 
on ftp/netcat or parse the wput output to determine the current size or even 
download the remote file. You just need to pad the first $remote_size bytes 
to a temporary file, append the contents of images.txt to it and then upload 
the temporary file, where again only the appended bytes will be submitted.

-- 
Mit besten Grüßen
 Hagen                          mailto:itooktheredpill@gmx.de
                      http://itooktheredpill.dyndns.org