Dos2unix and fromdos commands
Dos2unix and fromdos commands
The usage of the two commands is the same, except that the environment of the two commands is different.
Dos2unix is used in centos series systems, and fromdos is used in ubuntu series systems.
Usage: dos2unix filename = fromdos filename
It means: convert the file format of the windos system to the file format that can be used by the linux system, otherwise the file may have errors in the linux system, such as the error character ^ m displayed in the file.
The reason for this error is that the newline character in the windos environment is\ r\ n, while the newline character in the linux system is direct.