Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!scu From: scu@otter.hpl.hp.com (Shankar Unni) Newsgroups: comp.sys.hp Subject: Re: Third-party SCSI disks under HP-UX Message-ID: <2980013@otter.hpl.hp.com> Date: 19 Feb 91 17:54:48 GMT References: Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 41 In comp.sys.hp, hardy@golem.ps.uci.edu (Meinhard E. Mayer (Hardy)) writes: > Now you can move directories to disk2 as described in the System > Administrator Task manual. I found that using rcp -r (via a diskless > node), was much quicker -- the only disadvantage was that the > modification dates were changed. If you want to copy a tree to a target on the same node, instead of using rcp -r, an equally fast and more reliable way is to execute the following script, which preserves access and modify times, ownerships and links, if run by a root user: % copytree dir1 dir2 The copytree script looks like the following: ------------------------------ #!/bin/ksh if [ $# != 2 ]; then 1>&2 echo Usage: $0 dir1 dir2 exit 1 fi if [ ! -d $1 -o ! -d $2 ]; then 1>&2 echo Usage: $0 dir1 dir2 exit 1 fi cd $1 find . -hidden -print | cpio -paduvmx $2 ------------------------------ The arguments "dir1" and "dir2" mean the same thing that they do for "cp -r". ----- Shankar Unni E-Mail: shankar@cup.hp.com Hewlett-Packard Laboratories, Bristol. DISCLAIMER: This response does not represent the official position of, or statement by, the Hewlett-Packard Company. The above data is provided for informational purposes only. It is supplied without warranty of any kind.