Forrest logo
back to the dos2unix tool

dos2unix:tldr:03d47

dos2unix: Change the line endings of a file.
$ dos2unix ${filename}
try on your machine

The command "dos2unix" is used to convert text files from the DOS/Windows format to the Unix/Linux format. The ${filename} is a placeholder for the specific file you want to convert.

When you run this command, it will take the specified file (${filename}) and convert any Windows-specific line endings (CRLF, Carriage Return and Line Feed) to Unix-specific line endings (LF, Line Feed) if any are present. This is commonly used when working with files that have been transferred or copied between Windows and Unix systems, as the line ending formats differ.

It's worth noting that this command requires the "dos2unix" utility installed on your system. If it is not installed, you will need to install it before running this command.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dos2unix tool