Copy directory from local host to remote host

Here is a simple and secure way to copy a directory structure from a local host to a remote host:

 

# tar -czf – . | ssh root@ubuntu “(cd /mnt/tegile;tar -xpzf -)”

The – repersents stdin

The . means current directory

Permanent link to this article: https://daherlabs.mywire.org/wordpress/?p=233

Leave a Reply

Your email address will not be published.