This program calculates entropy of a file byte by byte. The lower the entropy, the more information the file contains, e.g. text file has low entropy, while compressed / encrypted file has high entropy. Entropy varies between 0 (least entropy - file contains only 1 value) and 8 (file contains all possible byte values, with equal probabilities)
entropy [flags] file
-b int
Number of bins on graph (default 10)
-g Show output graph
-l int
Max graph bar length (default 30)
-q Number-only output (quiet mode)
Get entropy of file.txt:
entropy file.txtGet entropy of file.txt in quiet mode (outputs only float value, for easier automated processing):
entropy -q file.txtGraph a histogram of file.txt with default settings:
entropy -g file.txtGraph a histogram of file.txt with 20 bins:
entropy -g -b 20 file.txtGraph a histogram of file.txt with 20 bins and max bar length of 60 characters:
entropy -g -b 20 -l 60 file.txt