What are the differences between MD5 binary mode and text mode?

Here is my testing:

...$ md5sum -b roy.html f9283ca2833ff7ebb6781ab8d23a21aa *roy.html ...$ md5sum -t roy.html f9283ca2833ff7ebb6781ab8d23a21aa roy.html 

Is there a difference between the two modes?

+6
source share
1 answer

"- b" --binary

  • Treat each input file as binary, reading it in binary mode and displaying the '* flag. This is the inverse of --text. On systems such as GNU, which do not distinguish between binary and text files, this option simply puts each input mode as binary: the MD5 checksum is unaffected. This option is used by default for systems such as MS-DOS that distinguish between binary and text files, with the exception of reading the standard input when the standard input is a terminal.

"- t" --text

  • Treat each input file as text, reading it in text mode and displaying a flag. This inversion is binary. This option is used by default on GNU systems that do not distinguish between binary and text files. On other systems, this is the default value for reading standard input when the standard input is a terminal. This mode is never used by default if -tag is used.
+4
source

Source: https://habr.com/ru/post/950798/


All Articles