Most Unix programs rely on cksum for checking duplicate files. If you happen to migrate programs doing that, you need to make sure that you’ll be using the same algorithm for the same functionality of course. Here is the [cksum algorithm] and here is the [cksum man] page. The class below is implementing the java.util.zip.Checksum interface for extensibility. /** * Compute the checksum of a data stream using the * POSIX cksum algorithm. */ public class Cksum implements Checksum { /** * The checksum value. */ private int value; /** * The length of the stream. */ private int length; /** * The cksum payload. */ private final int[] payload = { 0x00000000, 0x04C11DB7, 0x09823B6E, 0x0D4326D9, 0x130476DC, 0x17C56B6B, 0x1A864DB2, 0x1E475005, 0x2608EDB8, 0x22C9F00F, 0x2F8AD6D6, 0x2B4BCB61, 0x350C9B64, 0x31CD86D3, 0x3C8EA00A, 0x384FBDBD, 0x4C11DB70, 0x48D0C6C7, 0x4593E01E, 0x4152FD...