Originally posted by Gary Atkinson
#!/usr/bin/ksh# Begin Module Header ==============================================================================##------# Name:#------## tar_tar_dir##---------# Purpose:#---------## Copy an entire directory tree with all files and links to another base directory# using the tar command## Notes:#-------## This script is nice because it pipes the output of one tar command to another,# which requires a little bit of temporary memory.## Example of normal usage:## cd $HCIROOT# tar_tar_dir ./test_picis /3.5.2P_picis##---------# History:#---------## 1999.10.29 Russ Ross# - wrote initial version## End of Module Header =============================================================================(cd $1 && tar -cf - .) | (cd $2 && tar -xBf -)