Fast and Secure Remote File Transfer Using The Command Line

One of the fastest ways to transfer files between remote machines is using SSH:

tar -cz *.jpg | ssh <username@host> "tar -xzC <path-to-expand>"

This will create a single compressed archive of all jpg files in the current directory, transfer them securely to the specified host (logging in with the specified username), and then expand the archive and save the files to the specified path. Cool, isn’t it?

From my experiments this is faster than using scp, sftp and rsync. Note, though, that if you make further changes in your local directory after the initial copying to the remote machine, and you wish to sync those changes to the remote directory, then it is faster to use rsync. But the initial copying is faster using SSH.

This entry was posted in Unix Tidbits. Bookmark the permalink.

5 Responses to Fast and Secure Remote File Transfer Using The Command Line

  1. cardssharing says:

    Hey, I think your website might be having browser compatibility issues.

    When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it
    has some overlapping. I just wanted to give you a quick heads up!
    Other then that, fantastic blog!

  2. Pretty! This was an extremely wonderful post.
    Thank you for providing these details.

  3. Your feet swell during running, as much as a full shoe size.

    After an Achilles tendon rupture, a player will be able to walk flat-footed, but will
    not be able to stand up on his or her toes on the affected side.
    Ill-fitting shoes may also cause pain because they tend to squeeze the
    foot, causing the pressure inside the increase.

    • Delores says:

      &#ac02;Be28use when I’m irritable I don’t want to raise my voice, I want to smash your head in with a rock.” Exactly! And in my case, since I tend to self-harm, I want to smash my head in with a rock. Or at least my hand or something. Anything to release from the pain and crushing weight of what I’m feeling. Great article. Thanks.

  4. Kanji iss a writing system that the Japanese are based
    on ancient Chinese script, aso it consists of 50,000 characters.
    Women go about doing love expressing their feeling
    and emotions through their tattoo designs.

    This is the best Arabic and free calligraphy font I could find as a result of how
    legible it’s without losing its uniqu style. In bygone era of tribes from worldwide the folks their
    grouhps are increasing, being a part of
    the lifestyle. Worse part about it is that they can have to pay for thaat tattoo even thpugh it comes out horrendous.

Leave a Reply

Your email address will not be published. Required fields are marked *