From owner-freebsd-questions@FreeBSD.ORG Thu May 11 02:21:32 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 808B816A400 for ; Thu, 11 May 2006 02:21:32 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D53543D46 for ; Thu, 11 May 2006 02:21:32 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k4B2LVaW024455; Wed, 10 May 2006 21:21:31 -0500 (CDT) (envelope-from dan) Date: Wed, 10 May 2006 21:21:31 -0500 From: Dan Nelson To: "Don O'Neil" Message-ID: <20060511022131.GC76653@dan.emsphone.com> References: <005a01c67498$a54a2a70$0300020a@mickey> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005a01c67498$a54a2a70$0300020a@mickey> X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-questions@freebsd.org Subject: Re: Copying a file system w/ tar - symbolic links not copied right. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2006 02:21:32 -0000 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