4 ms·
For copying a directory tree from host1 to host2 preserving user / permissions and compressing on the fly to reduce network usage i use: # from host1: cd $DIR
by w0land 7y ago
For copying a directory tree from host1 to host2 preserving user / permissions and compressing on the fly to reduce network usage i use:
# from host1:
cd $DIRECTORY && tar -jcf - . | ssh host2 "cd DESTINATION_DIR && tar jxvf - "