In bash, I can count the number of bytes in a text file as follows:
cat textfile.txt | wc -c
However, I cannot point the catcontents of a bitmap file (such as PNG) to standard input.
How to count the number of bytes in a bitmap file?
The identifier rather does not take into account the number of bytes used to store it on the disk, since I understand that it can differ between operating systems - Im calculates the number of bytes that will be transmitted if the file was transferred via HTTP (discounting HTTP headers, of course )
source
share