home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!mcsun!sunic!ugle.unit.no!news
- From: Harald.Eikrem@delab.sintef.no
- Subject: Re: Keeping mods AND owners of copied files
- In-Reply-To: kan9691@bcstec.ca.boeing.com's message of 26 Aug 92 16:41:06 GMT
- Message-ID: <1992Aug27.022126*Harald.Eikrem@delab.sintef.no>
- Sender: news@ugle.unit.no (NetNews Administrator)
- Organization: SINTEF DELAB, Trondheim, Norway.
- References: <3436@bcstec.ca.boeing.com> <3450@bcstec.ca.boeing.com>
- Date: 27 Aug 92 02:21:26
- Lines: 22
-
- kan9691@bcstec.ca.boeing.com (Ken Niedermeyer) reported:
-
- ! Thanks to everyone who emailed solutions AND examples!!!
- ! Here is what I found out:
- !
- ! cpio will copy directory hierarchies preserving mods and owners:
- !
- ! create the directory to be copied to (newdirectoryname)
- ! cd to the directory to be copied from
- ! find . -depth -print | cpio -pdlm newdirectoryname
- !
- ! tar will copy directory hierarchies (without going to tape first)
- ! preserving mods and owners:
- !
- ! create the directory to be copied to (newdirectoryname)
- ! cd to the directory to be copied from
- ! tar cf - . | (cd newdirectoryname; tar xpfB -)
-
- Also check out GNU `cp -a' if you can, latest version found in
- fileutils-3.3, I believe.
-
- ~~harald E.
-