Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: tar fs copy Message-ID: <2917@sun.uucp> Date: Tue, 22-Oct-85 03:35:42 EDT Article-I.D.: sun.2917 Posted: Tue Oct 22 03:35:42 1985 Date-Received: Thu, 24-Oct-85 00:38:45 EDT References: <832@burl.UUCP> <221@drivax.UUCP> <842@burl.UUCP> Organization: Sun Microsystems, Inc. Lines: 18 > > (cd $1; tar cf - .) | (cd $2; tar xf -) > > or (cd $1; find . -print | cpio -o .) | (cd $2; cpio -idu) > for those without tar. Or (cd "$1"; find . -depth -print | cpio -pdl "$2"), according to the S5 "cpio" manual page. > What I really wish our System V people would do is put in the -r flag > (for recursive) on cp(1), like Berkeley did a long time ago. It's not too hard to do (I did it a while ago, but don't have the sources handy). Both "cp -r" and "tar"/"cpio" have their uses. "cp -r" is more convenient, but back-to-back "tar"s and "cpio" will preserve more information. (Beware of symbolic links if you do a "cp -r", for instance; "cp" doesn't know from symlinks.) Guy Harris