No shame because for me I would just get compression with
`tar -czf - somedir | ssh somehost tar -xzf -`
Because yanno . . . .
Nah, that's what the other terminal window is for . . . ;)
(but TBH the destination side really should look something like `ssh somehost bash -c 'cd /actual/target/directory; tar -xzf -'`. I mean you don't want it just dumping in the home dir, right?)
Of all the things I would do in a posix terminal, cmd isn't one of them.
@penryu @Paxxi @jimbob I kept running into Steve Walli at Usenix when he was working on Interix (later to become SFU), and at one I asked him when they were going to get bought by Microsoft and shelved. He said it was unlikely for legal reasons. Next year they had been bought by Microsoft and shelved. I asked him if he was lying when he said that and he asked "was it early or late in the convention?"...
Demand meant they had to bring it back but boy were they passive-aggressive about it.
@jimbob Definitely true, but I still use it for big transfers because you can "easily" resume a transfer if it fails.
For rsync, compression is -z, tho I just have it in my muscle memory that "rsync" is always followed by "-avzP". :P
That enables compression and tries copying everything as is (think cp -a) while showing detailed progress info and enables resuming the transfer.
@jimbob put the worms back in the can where they belong!
Um yeah, I think at one stage i learnt that, but I suspect it was forgotten amongst far too many other options and defaults
@hynek @jimbob what is the source for this? What’s the “official” replacement? I would have assumed even rsync was built on scp
That said, I see no reason to use scp over rsync. Yes , I can never remember all the flags, but that’s what shell aliases are for, since you only need a small handful of combinations to do anything.
@tjc @jimbob Here’s some details: https://lwn.net/Articles/835962/
Not sure at this point if the sftp-based scp that’s teased in the article and IIRC was linked in this thread is more of a stopgap or the new real thing. I personally prefer scp too because it’s just simpler and less dangerous to use.
@tjc @hynek @jimbob Scp relies on legacy protocols and lacks proper args sanitation.
New versions of scp have been updated to use sftp internally to avoid the security issues, so maybe safe to use depending on OS, but it’s safer just to always use rsync instead.
Here’s a summary from Redhat with more info and links. https://access.redhat.com/articles/5284081