Copy Files Across a Network/Internet in LINUX

/ Published in: Bash
Save to your folder(s)

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.

Copy this code and paste it in your HTML
  1. tar -cf - /some/file | ssh tar -xf - -C /destination


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.