Saturday, November 5, 2011

Solaris:Transfer data using tar rsync

tar cf - /source/file | (cd /target/file; tar xf -)


or


tar cf - * | ( cd /target; tar xfp -)


or


tar cvzf - my_dir | ssh server 'tar xzf -'

or

tar -cf - directory | ssh user@hostB "cd target_dir; tar -xf -"

or

rsync -aE -e ssh directory user@hostB:target_dir

No comments:

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...