Pages

Sunday, March 18, 2012

Fast Way to Transfer Small Files over Network

When you want to copy or transfer hundreds of small files, it usually takes time. You may tar or zip these files by executing the following command:
tar jcvf backup.tar.bz2 yourstuff someotherdata

then, you will start to transfer this file and untar on the destination system.

Of course, you can run following command to transfer on-the-fly:
tar jcvf - yourstuff someotherdata | ssh username@destination.domain "tar jxvf -"

No comments:

Post a Comment