Saturday, November 19, 2011

Unix: copy to remote via cpio example

cpio code for transferring files from one system to another:
for dir in $(cat /dir.txt)#file containing ACL directories
do
cd $dir
find . -print -depth | cpio -omPv | rsh "(cd $dir; cpio -idumvP
)"
done

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...