Hello,

when doing some tests with lftp, I found a strange behavior with the 'put -c' command.

If I want to copy a file to a FTP server, and the file already exists, it seems that the file is copied only if the source is bigger than the destination.
Is it the expected behavior ?

Here is my test:

# Client side
$ echo "abcd" > /tmp/test.txt
$ lftp -c "open 'ftp://test:pass@192.168.3.55'; put -c /tmp/test.txt"
# Server side
$ cat test.txt
abcd

# Client side
$ echo "abcdefgh" > /tmp/test.txt
$ lftp -c "open 'ftp://test:pass@192.168.3.55'; put -c /tmp/test.txt"
# Server side
$ cat test.txt
abcdefgh

# Client side
$ echo "xyz" > /tmp/test.txt
$ lftp -c "open 'ftp://test:pass@192.168.3.55'; put -c /tmp/test.txt"
# Server side - file has not been modified !
$ cat test.txt
abcdefgh


Best regards,
Arnaud Rébillout
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to