Date: Wed, 10 May 2006 21:02:25 -0500 From: Kevin Kinsey <kdk@daleco.biz> To: "Don O'Neil" <don@lizardhill.com> Cc: 'Andy Greenwood' <greenwood.andy@gmail.com>, freebsd-questions@freebsd.org Subject: Re: Copying a file system w/ tar - symbolic links not copied right. Message-ID: <44629B31.1090006@daleco.biz> In-Reply-To: <007601c6749a$28057630$0300020a@mickey> References: <007601c6749a$28057630$0300020a@mickey>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 5/10/06, Don O'Neil <don@lizardhill.com> wrote: >> >> tar cf - /source/* | ( cd /destination && tar xfv - ) >> >> It copies all the files, but the symbolic links are copied as files of >> 0 length, rather than re-established as links. >> >> What am I doing wrong here, or is my tar broken? > From: Andy Greenwood [mailto:greenwood.andy@gmail.com] > Sent: Wednesday, May 10, 2006 6:24 PM > To: Don O'Neil > > # man tar > > specifically, the -L option Don O'Neil wrote: > My man says: > > -L number > --tape-length number Change tapes after writing number * 1024 bytes. > > Nothing about symbolic links.... Now there is an option --unlink-first and > --dereference... Both of which don't copy the links, but unlink or copy the > actual source file. > > Don > > And again: >> What am I doing wrong here, or is my tar broken? Heh, heh, could be. Andy is referring to "BSDtar", which is tar(1) on later releases, and your -L option is from "GNUtar", which is tar(1) on, IIRC, 4.X and elder, and is now available in ports as gtar. As for what's really the problem, I can't say as I can tell. On my 6.X box, everything works as expected. For fun, I shelled into a 4.11 box, and everything works as expected, both my tests and your example. Maybe your tar *is* broken. Or, more likely, we're both a tad dense ATM. Kevin Kinsey -- What foods these morsels be!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44629B31.1090006>