Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 2002 05:40:03 -0700 (PDT)
From:      Peter Pentchev <roam@ringlet.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: gnu/44196: tar (sort option)
Message-ID:  <200210191240.g9JCe3jf043427@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR gnu/44196; it has been noted by GNATS.

From: Peter Pentchev <roam@ringlet.net>
To: abc@anchorageinternet.org
Cc: Giorgos Keramidas <keramida@FreeBSD.org>,
	bug-followup@FreeBSD.org, "Kerr, Greg" <greg@kerr1.com>,
	"Choudhury, Raj" <raj.choudhury@de.opel.com>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210191240.g9JCe3jf043427>