Arnaud Rébillout
2013-11-15 09:47:51 UTC
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:***@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:***@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:***@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
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:***@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:***@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:***@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