unix2dos

Change Unix-style line endings to DOS-style. Replaces LF with CRLF. More information: <https://waterlan.home.xs4all.nl/dos2unix.html>.

Install

All systems
curl cmd.cat/unix2dos.sh
Debian Debian
apt-get install dos2unix
Ubuntu
apt-get install dos2unix
Alpine
apk add dos2unix
Arch Arch Linux
pacman -S dos2unix
image/svg+xml Kali Linux
apt-get install dos2unix
CentOS
yum install unix2dos
Fedora
dnf install dos2unix
Windows (WSL2)
sudo apt-get update sudo apt-get install dos2unix
OS X
brew install dos2unix
Raspbian
apt-get install dos2unix
Docker
docker run cmd.cat/unix2dos unix2dos powered by Commando

Change Unix-style line endings to DOS-style. Replaces LF with CRLF. More information: <https://waterlan.home.xs4all.nl/dos2unix.html>.

  • Change the line endings of a file:
    unix2dos path/to/file
  • Create a copy with DOS-style line endings:
    unix2dos -n path/to/unix_file path/to/dos_file

© tl;dr; authors and contributors