[BusyBox] [PATCH] ftpput/ftpget files from/to stdin/stdout
David Decotigny
David.Decotigny at free.fr
Fri Oct 10 08:26:50 UTC 2003
Hi,
[ I did not subscribe to the mailing list, so please reply to my
personnal email address ]
The patch (against today's cvs on usage.c and ftpgetput.c) adds support
for sending and receiving files through FTP from/to stdin/stdout. Please
note that the command line usage has been modified :
ftpget [options] remote-host local-path-to-file remote-path-to-file
ftpput [options] remote-host remote-path-to-file local-path-to-file
This allows both the remote and local files to have different names, and
to send/receive from/to stdin/stdout (file name = "-"). Example:
ftpput ftp-server /pub/incoming/toto.txt /etc/passwd
To send stdin to a remote file, use:
ftpput [options] remote-host remote-path-to-file -
To retrieve a remote file to stdout, use:
ftpget [options] remote-host - remote-path-to-file
I've tested this patch with a wu-ftpd 2.6.2(1) server (debian unstable
ppc yesterday). It should work as well as before, with only one
exception in ftpput: we don't CWD before storing the remote file (see
ftp_send function) anymore. It seems not to be mandatory with my ftpd,
but restore it if necessary (I did not read the rfc).
Hope this is of any interest. And thanks a LOT for busybox/uclibc !
Bye,
--
David Decotigny -- http://david.decotigny.free.fr
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ftp-stdinout.diff
Url: http://lists.busybox.net/pipermail/busybox/attachments/20031010/dd59155f/attachment.diff
More information about the busybox
mailing list