That way, yes, bur curl also understand ftp and other protocols.
one great trick is not to use a tarball to transfer, but to pipe a tar over a ssh...
You have a tar.gz file on a remote machine and want to extract it to the machine you are currently logged into:
ssh user@host "cat /path/file.tar.gz" | tar zpvxf - -C /DestPath
another great is
tar is usually used for achiving applications, but what we are going to do in this case is tar it then pipe it over an ssh connection. tar handles large file trees quite well and preserves all file permissions, etc, including those UNIX systems which use ACLs, and works quite well with symlinks.
the syntax is slightly different as we are piping it to ssh:
tar -cf - /some/file | ssh host.name tar -xf - -C /destination
-or with compression-
tar -czf - /some/file | ssh host.name tar -xzf - -C /destination
Switch -c for tar creates an archive and -f which tells tar to send the new archive to stdout.
The second tar command uses the -C switch which changes directory on the target host. It takes the input from stdin. The -x switch extracts the archive.
The second way of doing the transfer over a network is with the -z option, which compresses the stream, decreasing time it will take to transfer over the network.
Some people may ask why tar is used, this is great for large file trees, as it is just streaming the data from one host to another and not having to do intense operations with file trees.
If using the -v (verbose) switch, be sure only to include it on the second tar command, otherwise you will see double output.
use VICM3 for a full 97USD discount on your first year!