Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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



The 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.


That'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.


Yep, and I imagine that's roughly the fix they went for.


But you don't need to specify a filename, only a target directory.


> the filename passed as first arg


Reading comprehension issue on my part there, sorry.

I should have specified glob expansion in the source part, which SCP needs to handle.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: