Re: [PATCH] Cogito documentation updates
- From
Petr Baudis <pasky@suse.cz>
- Date
- Nov 27, 2005, 15:28 UTC
- Message-ID
- <20051127152827.GJ22159@pasky.or.cz>
- In-Reply-To
- <Pine.LNX.4.64.0511230923131.13959@g5.osdl.org>
Dear diary, on Wed, Nov 23, 2005 at 06:29:34PM CET, I got a letter where Linus Torvalds <torvalds@osdl.org> said that...
Show 28 quoted lines
> > > On Wed, 23 Nov 2005, Randal L. Schwartz wrote: > > > > Delete the -d switch, or explain to me why it is there, and let's work > > out a POSIX workaround. > > It's > > -d: same as --no-dereference --preserve=link > > --no-dereference > never follow symbolic links > > --preserve[=ATTR_LIST] > preserve the specified attributes (default: mode,owner- > ship,timestamps) and security contexts, if possible additional > attributes: links, all > > so it's basically making sure that the copy copies the _link_, not the > file it points to. > > I think you may have to use "cpio -p" instead of "cp" to be portable. > Something like > > cpio -plmu $src $dst > > might do it.
Well, but -l links the files instead of copying them, right? That's certainly not what I want, I want to really _copy_ the files. Also, does cpio preserve the hardlinks between the copied files? If not, then what you wrote is equivalent to
cp -pRP
which should be even POSIX, hopefully. That's what I changed the -dpR to now.
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't.