Copying a file system w/ tar - symbolic links not copied right.
Kevin Kinsey
kdk at daleco.biz
Wed May 10 19:02:33 PDT 2006
> On 5/10/06, Don O'Neil <don at 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 at 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!
More information about the freebsd-questions
mailing list