Linux Tips: Difference between revisions

From miki
Jump to navigation Jump to search
Line 5: Line 5:
</source>
</source>


== Fast Copy using Netcat ==
== Fast Copy==
=== Using Netcat ===
When copying a directory that contains a lot of small files (like 1000+ files <1kB), it is faster to actually generate a tarball of the directory and have it unpacked on the fly on the destination server [http://www.4bcj.com/post/2008/01/Fast-File-Copy---Linux!.aspx]:
When copying a directory that contains a lot of small files (like 1000+ files <1kB), it is faster to actually generate a tarball of the directory and have it unpacked on the fly on the destination server [http://www.4bcj.com/post/2008/01/Fast-File-Copy---Linux!.aspx]:
<source lang="bash">
<source lang="bash">
Line 11: Line 12:
Source$ tar -cz /source/dir | nc Target_Box 2342
Source$ tar -cz /source/dir | nc Target_Box 2342
</source>
</source>

=== Other ===
See [http://en.gentoo-wiki.com/wiki/Fast_Copy here]

Revision as of 21:24, 2 March 2010

Disable Auto-Mount

You can temporarily disable automount by doing as root [1]:

$ rcdbus stop

Fast Copy

Using Netcat

When copying a directory that contains a lot of small files (like 1000+ files <1kB), it is faster to actually generate a tarball of the directory and have it unpacked on the fly on the destination server [2]:

Destination$ nc -l -p 2342 | tar -C /target/dir -xzf -
Source$ tar -cz /source/dir | nc Target_Box 2342

Other

See here