Get the App
SLTechnology News&Howtos  ›  Servers  › 

Dos2unix and fromdos commands

Shulou Source: shulou.com Published: 2022-06-03 09:12:41 12月06日 Update

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.

Tags: System file command error two newline character format environment different same reason character meaning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info NVidia OPPO Reno vpn