On a Linux system, I need to create a large file (about 10GB), uncompressible file.
This file is supposed to reside in a Docker image, needed to test performance in transferring and storing large docker images on a local registry. Therefore, I need the image to be "intrinsically" large (that is: uncompressible), in order to bypass optimization mechanisms.
fallocate
(described at Quickly create a large file on a Linux system ) works great to create large files very quickly, but the result is a 0 entropy large file, highly compressible. When pushing the large image to the registry, it takes only few MB.
So, how can a large, uncompressible file be created?