How to move or copy whole directory trees across a network
The following command will move an entire directory tree across a networkwhile preserving permissions, uids and gids.
$rsh RemoteHost "cd TargetDir; tar -cBf - ." | tar -xvBf -
Explanation:
The tar-create is rsh'd to the remote system and is written to
stdout (the pipe).
The local system is extracting the tar that is being read from
stdin (the pipe).
From: abeloni
Another method is:
rcp -rp host1:/dir host2:/dir
Home | FAQ |