4 ms·
A simple unix-like way would be to use tar with plain ssh. To transfer a set of files from local device to a remote device is as easy as: tar -c path/to/f
by paskozdilar 5y ago
A simple unix-like way would be to use tar with plain ssh.
To transfer a set of files from local device to a remote device is as easy as:
tar -c path/to/file1 path/to/file2 ... | ssh user@hostname tar -x
The flags can be memorized with a mnemonic:
-c = create (archive file)
-x = extract (archive file)
- adolph 5y agoOr dd | tar | ssh so you can control the size of compressed data (as in very large files) https://www.linode.com/docs/guides/copying-a-disk-image-over-ssh/ https://www.linode.com/docs/guides/copying-a-disk-image-over...
- chasil 5y agoThis could bite you on platforms where tar observes absolute links (commercial UNIX comes to mind). There is wild variation in tar implementations beyond what is required by POSIX.
- aidenn0 5y agoI use "gtar" on the command-line in that case; it either fails because gnu-tar is missing, or it works as expected. "-H pax" is also an important item to specify on the side creating the tar file, as pax support is much older than pax as a default, and the pre-pax default (gnu or USTAR?) has a short enough maximum path length as to have caused me problems in the past.