Using tar instead of ssh

When you move files across servers, you can use tar over ssh. Here's how.

When you move files across servers, you can use tar over ssh. By using tar, you can keep the same attribute for

files and directories. This is faster that "scp -p".


Example: Here's how to copy over /usr/man/man1 from server1 to server2 in the same path.

server1> tar -cf - /usr/man/man1 | ssh server2 tar -xvf -

or

server2> ssh server1 tar -cf - /usr/man/man1 | tar -xvf -

This was first published in September 2002

Dig deeper on Secure Remote Access

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

1 comment

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudSecurity

SearchNetworking

SearchCIO

SearchConsumerization

SearchEnterpriseDesktop

SearchCloudComputing

ComputerWeekly

Close