I'm using scp
to copy a folder from Windows 10 back to Ubuntu 20.4 (all software has been updated).
$ uname -a
Linux ray-desktop 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
This is what's on the Windows 10 host:
$ ssh asus -n 'dir Desktop\Test\_Underscore\_Albert\2022'
Volume in drive C is OS
Volume Serial Number is 545E-5BEF
Directory of C:\Users\ray\Desktop\Test\_Underscore\_Albert\2022
2023-01-22 04:35 PM <DIR> .
2023-01-22 04:35 PM <DIR> ..
2023-01-22 04:35 PM <DIR> Receipts
2023-01-22 04:35 PM <DIR> Signed
2023-01-22 04:35 PM <DIR> WorkProduct
0 File(s) 0 bytes
5 Dir(s) 681,766,621,184 bytes free
This copies the "2022" folder correctly:
$ scp -q -r -p asus:Desktop/Test/_Underscore/_Albert copy-underscore-albert
$ ls copy-underscore-albert/2022
Receipts Signed WorkProduct
This copies the folder that contains the "2022" folder, but fails:
$ scp -q -r -p asus:Desktop/Test/_Underscore copy-underscore
[exit status 1]
$ ls copy-underscore/_Albert/2022
Receipts
The "Receipts" folder is copied completely.
The other two folders are missing.
The same thing happens if I copy the "Test" folder.
Trying again, verbosely:
$ scp -v -r -p asus:Desktop/Test/_Underscore copy-underscore >©.out
[exit status 1]
$ tail -20 copy.out
Sink: T1643869420 0 1674423352 0
Sending file modes: C0666 4528 model.cdat
Sink: C0666 4528 model.cdat
File mtime 1674423352 atime 1674666044
Sending file timestamps: T1674423352 0 1674666044 0
Sink: T1674423352 0 1674666044 0
Entering directory: D0777 0 Temp
Sink: D0777 0 Temp
File mtime 1674423353 atime 1674666044
Sending file timestamps: T1674423353 0 1674666044 0
Sink: T1674423353 0 1674666044 0
ESink: D0777 0 2
ntering directory: D0777 0 2
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 2 clearing O_NONBLOCK
Transferred: sent 54028, received 163861768 bytes, in 9.7 seconds
Bytes per second: sent 5549.1, received 16829918.5
debug1: Exit status -1073741571
This is consistently repeatable.
Any idea what is going wrong here?