Hi, I have no real found bug in `cpio`, but I decided to ask on this list first before further investigation.
I saved same files in a `cpio` archive an checked afterwards whether all files are included. I was astonished, that all files were there, but for 5 out of several thousands in the complete archive the order was different. One time two were swapped and one time 3 were rotated by one. What I did: $ cpio --version cpio (GNU cpio) 2.11 - create a list of files with: $ find home/reuti -depth -print0 > mylist - create the archive: $ cpio --null --quiet -o -c -B -a < mylist > archive.cpio.null - create a list of file in the archive: $ cpio -t -I archive.cpio.null > archive.cpio.null.list - translate \0 to \n in the original list: $ tr '\0' '\n' < mylist > mylist.txt - compare them: $ diff mylist.txt archive.cpio.null.list Out of 976626 files there are some discrepancies: 657136,657137d657135 < home/reuti/local/gcc-4.7.3/bin/g++ < home/reuti/local/gcc-4.7.3/bin/c++ 657138a657137,657138 > home/reuti/local/gcc-4.7.3/bin/c++ > home/reuti/local/gcc-4.7.3/bin/g++ 657147d657146 < home/reuti/local/gcc-4.7.3/bin/gcc 657149,657150c657148 < home/reuti/local/gcc-4.7.3/bin/gcc-ar < home/reuti/local/gcc-4.7.3/bin/gcc-nm --- > home/reuti/local/gcc-4.7.3/bin/gcc 657151a657150 > home/reuti/local/gcc-4.7.3/bin/gcc-ar 657152a657152 > home/reuti/local/gcc-4.7.3/bin/gcc-nm These are plain files, but with hard links. But neither all links to these files were swapped, nor do all files with hard links show this behavior. The home directory wasn't touched during the procedure and I can reproduce it again in exactly the same way. If either non or 95% were in a different order I would assume it's just the way it is. But this hand full of files makes me wondering about it. The question I have is: is it a known behavior that the order of files is changed by `cpio` while either the list of files is read or the archive created? Under what circumstances does this happen? -- Reuti