Ultra-lightweight Network File Moving for Linux/UNIX

A few days ago, my main machine went kaput and I needed a fast way to copy several hundred gigs of data to a slow, old 2Ghz Celeron. Thus began my search for the lightest file-copying solution I could find. So far, that’s tar with netcat.

The problem is that netcat, while a swiss army knife, is also very much a power-user’s tool and, with at least three flavors and multiple versions of each in use, the instructions for using netcat with tar to copy files are often using a subtly incompatible syntax.

It also doesn’t help that, because netcat has no clue what you’re planning to do with it, it takes a little experimentation to figure out which instructions match up with your expectations for how a file-moving tool should behave.

Here is a little wrapper script I wrote myself (¾ comments) to keep the use of tar+netcat simple and easy to remember. Use it as you will.

If you aren’t on a LAN and bandwidth is more the issue, you can either compress the tar stream the same way you’d compress a tar archive (check out lzop for something lighter on the CPU than gzip) or you can use a tool like rsync which will only transfer changes and makes resuming an interrupted transfer effortless.

You may also want to check out these pages for alternatives:

CC BY-SA 4.0 Ultra-lightweight Network File Moving for Linux/UNIX by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

1 Response to Ultra-lightweight Network File Moving for Linux/UNIX

  1. Pingback: Ultra-lightweight Network File Moving for Linux/UNIX | BSD - Vše o BSD

Leave a Reply

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

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.