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
