Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!ut-ngp!melpad!bigtex!james From: james@bigtex.uucp (James Van Artsdalen) Newsgroups: comp.unix.questions Subject: Re: Sys V does not have a recursive copy cmd... Message-ID: <250@bigtex.uucp> Date: Fri, 9-Jan-87 14:17:25 EST Article-I.D.: bigtex.250 Posted: Fri Jan 9 14:17:25 1987 Date-Received: Sat, 10-Jan-87 02:44:51 EST References: <1269@cadovax.UUCP> <1964@ptsfa.UUCP> <487@obelix.UUCP> Sender: root@bigtex.uucp Reply-To: james@bigtex.UUCP (James Van Artsdalen) Organization: F.B.N. Software, Austin TX Lines: 22 IN article <487@obelix.UUCP>, sven-e@obelix.UUCP (Sven L Eriksson) wrote: > In article <1964@ptsfa.UUCP> jmc@ptsfa.UUCP (Jerry Carlin) writes: > >Try "find . -print|cpio -pduvm /foo/bar/...". > Another way to do this copy is to use tar. (Tape file ARchiver) > tar cf - . | (cd todir ; tar xf - ) > If you use this command links between files in the tree will be kept. > Otherwise it will work exactly as the find|cpio version. I believe cpio will always maintain links between trees. If the "-l" option is given to the "cpio -p..." above, then cpio will link the new files if possible, making it analogous to a tree oriented ln. In this last case cpio is certainly faster than tar iff the source and destinations are on the same file system. Even if cpio cannot simply link the new files to the old ones I would except cpio to be quite a bit faster, because the cpio moves much less data through the pipe than the tar method does, and running one copy of cpio -p presumably has less overhead than two copies of tar. -- James R. Van Artsdalen ...!ut-sally!utastro!bigtex!james "Live Free or Die" Voice: (512)-323-2675 Modem: (512)-323-2773 5300B McCandless, Austin TX 78756