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

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)


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


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


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




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

Search: