A .tar is 512-byte blocks: a header, the file, padding, repeat
Tape archive has no index and no compression: each file gets a 512-byte header written in ASCII octal, then its bytes rounded up to the next block, and the archive ends with two zero blocks. Names longer than 100 bytes, sizes over 8 GiB and Unicode needed extensions, so there are four dialects (v7, ustar, GNU, pax) that still mix in one file. Open a tar, or one of the three written here, to walk every block.
Numbers are written as ASCII octal digits followed by a NUL or space, so a 12-byte size field holds at most 11 digits: 8¹¹ − 1 bytes. When a value doesn’t fit, GNU tar sets the top bit of the first byte and stores the number in binary (“base-256”), and pax writes it as decimal text in an extended header instead.
Machine A and machine B have identical file contents but list directories in different orders, check out files at different times, and belong to different users with different umasks. Switch on the options a reproducible build uses and watch the two SHA-256s converge.
check_box_outline_blank--sort=namestore entries in name order, not directory-listing ordercheck_box_outline_blank--mtime=@SOURCE_DATE_EPOCHclamp every timestamp to a fixed datecheck_box_outline_blank--owner=0 --group=0 --numeric-ownerdrop user and group names and idscheck_box_outline_blank--mode=go-w (umask-independent)normalise permission bitscheck_box_outline_blank--pax-option=delete=atime,delete=ctimeleave out access and change times (pax only)tar --format=posix -cf app.tar app/