step to reproduce 1. download file from sftp server $ echo -n "get file.txt"|sftp -a user@host - Connected to user@host. sftp> get file.txt Resuming /home/user/file.txt to file.txt /home/user/file.txt 2. check file with stat utility $ stat file.txt Access: 2019-03-12 18:25:30.326646411 +0200 Modify: 2019-03-12 18:25:30.328646433 +0200 Change: 2019-03-12 18:25:30.328646433 +0200 3. repeat step 1 $ echo -n "get file.txt"|sftp -a user@host - Connected to user@host. sftp> get file.txt Resuming /home/user/file.txt to file.txt /home/user/file.txt 4. check file with stat utility again $ stat file.txt Access: 2019-03-12 18:25:30.326646411 +0200 Modify: 2019-03-12 18:25:30.328646433 +0200 Change: 2019-03-12 18:25:30.328646433 +0200 file not modified! expected results: in step 3 suppress the output line Resuming /home/user/file.txt to file.txt or in some way show that file not modified? Some times i need update files from server. But not all files could be modified. It will be nice to see what files really downloaded(or modified).
Created attachment 3284 [details] Print "not modified" message when resumed transfer does not modify files I guess we could do something like the attached: print a "not modified" message when a resumed transfer results in no file changes. E.g. $ ./sftp -D ./sftp-server Attached to ./sftp-server. sftp> lcd /tmp sftp> get /bin/ls Fetching /bin/ls to ls /bin/ls 100% 132KB 161.8MB/s 00:00 sftp> reget /bin/ls Resuming /bin/ls to ls /bin/ls 100% 132KB 0.0KB/s 00:00 File "ls" was not modified
Patch applied and will be in OpenSSH 8.1 - thanks.
Closing all resolved bug with release of openssh-8.2