3 ms·
I’ve also used dd if=filename | ssh hostname dd of=remote_filename Quite a bit
by edgyquant 6y ago
I’ve also used
dd if=filename | ssh hostname dd of=remote_filename
Quite a bit
- jrumbut 6y agoThere's something a little badass about using dd to transfer a file to a remote system.
- a1369209993 6y agoHuh, pleasantly surprised to learn that dd correctly handles the truncated final block of a not-multiple-of-512-byte file; could have sworn that didn't work at some point.
- deleted 6y ago[deleted]
- dfox 6y agoSUS specifies that dd should do the "right thing" with input with non-integer number of blocks input, that is pad it with zeros if conv=sync, just pass through shorter otherwise.
- a1369209993 6y ago> SUS specifies that dd should do the "right thing" A example the C standard could stand to learn from, then.
- lloeki 6y agoAh yes, that one too. Used it a couple of times straight with a /dev/sda to best effort salvage data from a broken but running remote system I knew would not reboot as is.
- drran 6y agoWhy not just cat file | ssh user@host 'cat >file' ssh user@host cat file | cat >file ? PS. I use mc to copy: F5, Enter.
- edgyquant 6y agoCause when I younger I didn’t know how to pipe like that and dd just worked. It’s kinda stuck with me and there isn’t much a different imo