4 ms·
> If the remote server were to give a response like "here is the .bashrc file you asked for", though, scp would happily overwrite that file instead That really
by tarruda 6y ago
> If the remote server were to give a response like "here is the .bashrc file you asked for", though, scp would happily overwrite that file instead
That really surprised me. I would have thought the implementaton would send a byte stream and that the client program would simply pipe that to the filename passed as first arg
- NickNameNick 6y agoBut you don't need to specify a filename, only a target directory.
- kgwgk 6y ago> the filename passed as first arg
- NickNameNick 6y agoReading comprehension issue on my part there, sorry. I should have specified glob expansion in the source part, which SCP needs to handle.
- SuperCuber 6y agoThe problem is that it supports several files per transaction, for example recursively copying a folder from remote to local - then only the remote actually knows the names of the files and it has to send them.
- steerablesafe 6y agoThat's not a problem when you actually ask for a directory of content. If you are trying to pull a single file and it results in an another file pulled and put next to it then it is certainly surprising.
- SuperCuber 6y agoYep, and I imagine that's roughly the fix they went for.