[Level 1] Backup directories by cpio.
#!/bin/bash source=$1 target=$2 (cd $source; find . -print | cpio -ocv) | (cd $target; cpio -icuvd) # cd $source; find . -print | cpio -ocv > /tmp/tmp.cpio # cd $target; cpio -icuvd < /tmp/tmp.cpioWish this helps.
regards,
Stanley Huang
Comments
Post a Comment