bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] what decide the tar pack file order?


From: Tim Kientzle
Subject: Re: [Bug-tar] what decide the tar pack file order?
Date: Mon, 14 Jan 2008 07:30:49 -0800
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422

dapeng ni wrote:

But whatever in ubuntu 7.04 and 7.10, tar always pack file in
unpredictable order, such as:

tar asks the system for the list of files in
each directory; the order depends on many things,
including the file system implementation and sometimes
the precise history of file creations and deletions in
that directory.  See opendir(), readdir(), closedir()
documentation.

I even copy tar command file from 6.04 to replace current one, it is
no help. It seems tar is dependent on other program or configuration
to decide the order of package.  How can I set it up?

If you really need to control the order, you can use some other
program to create the list of files and use tar's -T option to
use that list instead of allowing tar to ask the system:

  find . | sort | tar -czvf out.tgz -T -

You'll probably need the --no-recursion option to tar as well.

Cheers,

Tim Kientzle




reply via email to

[Prev in Thread] Current Thread [Next in Thread]