Date: Wed, 10 May 2006 21:21:31 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: "Don O'Neil" <don@lizardhill.com> Cc: freebsd-questions@freebsd.org Subject: Re: Copying a file system w/ tar - symbolic links not copied right. Message-ID: <20060511022131.GC76653@dan.emsphone.com> In-Reply-To: <005a01c67498$a54a2a70$0300020a@mickey> References: <005a01c67498$a54a2a70$0300020a@mickey>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 10), Don O'Neil said: > Hi all... > > I'm trying to move a file system from one disk to another, and when I > do this: > > 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? Sounds like your tar's broken. (dan@dan.7) /tmp/z> ln -s testing link (dan@dan.7) /tmp/z> md bsdtar gnutar (dan@dan.7) /tmp/z> bsdtar cf - link | ( cd bsdtar && bsdtar xvf - ) x link (dan@dan.7) /tmp/z> gtar cf - link | ( cd gnutar && gtar xvf - ) link (dan@dan.7) /tmp/z> ls -l bsdtar gnutar bsdtar: total 4 drwxr-xr-x 2 dan wheel 512 May 10 21:19 ./ drwxr-xr-x 4 dan wheel 512 May 10 21:18 ../ lrwxr-xr-x 1 dan wheel 7 May 10 21:18 link@ -> testing gnutar: total 4 drwxr-xr-x 2 dan wheel 512 May 10 21:19 ./ drwxr-xr-x 4 dan wheel 512 May 10 21:18 ../ lrwxr-xr-x 1 dan wheel 7 May 10 21:19 link@ -> testing (dan@dan.7) /tmp/z> bsdtar --version bsdtar 1.01.020, libarchive 1.02.033 Copyright (C) 2003-2004 Tim Kientzle (dan@dan.7) /tmp/z> gtar --version tar (GNU tar) 1.13.25 -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060511022131.GC76653>