News for hackers. Stuff that matters.
Re:Deprecating scp by jcynix on Friday November 06, 2020 @06:43AM (#25006934)
Hmm, cp-like syntax? While I use scp rather often, especially for single file transfers, I still dislike that cp -a is scp -p instead.

As soon as there's more to transfer, I switch to rsync, not the least because of the possibility to optionally resume partial transfers.

Re:Deprecating scp by simias on Friday November 06, 2020 @07:22AM (#25007108)
scp/ssh options are also annoyingly inconsistent.

ssh uses '-p' to use a non-default port but scp uses '-P' (-p preserves mtime, as you pointed out). scp requires ipv6 to be in brackets (in order to parse the : correctly) but ssh requires it to be without brackets. Makes converting one command line to an other more annoying than it should be.

Re:Deprecating scp by dmurray on Friday November 06, 2020 @10:23AM (#25008214)
scp syntax can't be 100% compatible with both cp and ssh. Instead of going for 100% with either, or designing their own flags from scratch, I suppose they tried to pick the best of both.

-p for --port does seem like it's needed more often than -p for --preserve-mtime, but running ssh on non-standard ports was less of a thing when scp was designed.

Re:Deprecating scp by simias on Friday November 06, 2020 @11:11AM (#25008665)
To be clear it's not the choice of the meaning of -p that bothers me, it's the fact that it's inconsistent between scp and ssh. E.g.:

    ssh -p 2222 root@fd95:74a4:b46c:1000::4219
    scp -P 2222 root@[fd95:74a4:b46c:1000::4219]:/tmp/foo .
It generates a lot of editing when converting an ssh command into an scp one, or vice-versa. It's minor, but I deal with raw IPv6 hosts a lot for various reasons and it's a daily annoyance.
Re:Deprecating scp by dmurray on Friday November 06, 2020 @01:39PM (#25010010)
What I meant was, cp chose one meaning for -p, ssh chose another. scp can't match them both (so if scp had the behaviour you wanted, someone else who uses cp all the time would be confused by it).
Re:Deprecating scp by simias on Friday November 06, 2020 @01:50PM (#25010084)
Ah I see what you mean, but in this case they could've gone back and added -P as an alias for -p in ssh for instance. Similarly, it makes sense to make the brackets mandatory for scp to distinguish the path from the address, but then why not make ssh also support this format optionally?

Anyway, it's pure bikeshedding at this point, it's just that it's such a common annoyance for me that I can't help but nitpick.

Re:Deprecating scp by dmurray on Friday November 06, 2020 @06:22PM (#25012077)
> Ah I see what you mean, but in this case they could've gone back and added -P as an alias for -p in ssh for instance.

Yeah. It's one of the 13 (of 52) unused one-letter options, but such a common one you'd think they could waste a second letter on it.