From owner-freebsd-bugs Sat Oct 19 5:40: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FFDA37B401 for ; Sat, 19 Oct 2002 05:40:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A0A443E75 for ; Sat, 19 Oct 2002 05:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9JCe3x3043428 for ; Sat, 19 Oct 2002 05:40:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9JCe3jf043427; Sat, 19 Oct 2002 05:40:03 -0700 (PDT) Date: Sat, 19 Oct 2002 05:40:03 -0700 (PDT) Message-Id: <200210191240.g9JCe3jf043427@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: gnu/44196: tar (sort option) Reply-To: Peter Pentchev Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR gnu/44196; it has been noted by GNATS. From: Peter Pentchev To: abc@anchorageinternet.org Cc: Giorgos Keramidas , bug-followup@FreeBSD.org, "Kerr, Greg" , "Choudhury, Raj" Subject: Re: gnu/44196: tar (sort option) Date: Sat, 19 Oct 2002 15:37:37 +0300 On Sat, Oct 19, 2002 at 12:01:18PM +0000, abc@anchorageinternet.org wrote: > see end of email. these solutions do not work as expected. > so - i still say it is a fairly critical 'deficiency' bug > in tar - that it cannot archive sorted files without an > extensive command line as contained herein (and again, > this method fails in the sense that owner/group/permission > data gets lost, and also, empty directories are not saved), > and that the ability to create a sorted archive are very > important for the reasons cited herein. Owner/group info is preserved for the individual files, if you use tar's -p option on both archive creation and extraction. It will not be preserved for the directories themselves, because you have not really asked tar to preserve it; this, along with the empty dirs problem, is solved by, once again, examining tar's available options and noticing the '-n' one, which tells it to not recurse into subdirs, but just add an archive entry for the directory itself. So, the next thing you might want to try is: find -s $dir | tar -cznspf $dir.tgz -T - ..and then using tar -xzpf $dir.tgz to extract it. Does this help? G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If you think this sentence is confusing, then change one pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message