Menu

Tree [a9a249] master /
 History

HTTPS access


File Date Author Commit
 dos2unix 2025-05-19 Erwin Waterlander Erwin Waterlander [a9a249] Updated translations
 sandbox 2016-05-26 Erwin Waterlander Erwin Waterlander [58dce3] sandbox: get link target on Windows.
 .gitignore 2015-12-21 Erwin Waterlander Erwin Waterlander [a14856] * Added .gitignore
 Makefile 2017-08-05 Erwin Waterlander Erwin Waterlander [5fa0e4] Removed unneeded tabs from Makefiles.
 README.md 2016-01-24 Erwin Waterlander Erwin Waterlander [3393e7] Added README.md
 dos2unix.lsm 2015-12-20 Erwin Waterlander Erwin Waterlander [b04c24] * Removed execution permission from text and so...
 upload_sf.lftp 2024-01-20 Erwin Waterlander Erwin Waterlander [c16a0b] Version 7.5.2

Read Me

DOS2UNIX

DOS/Mac to Unix and vice versa text file format converter.

Description

The Dos2unix package includes utilities dos2unix and unix2dos to convert plain
text files in DOS or Mac format to Unix format and vice versa.

In DOS/Windows text files a line break, also known as newline, is a combination
of two characters: a Carriage Return (CR) followed by a Line Feed (LF). In Unix
text files a line break is a single character: the Line Feed (LF). In Mac text
files, prior to Mac OS X, a line break was single Carriage Return (CR)
character. Nowadays Mac OS uses Unix style (LF) line breaks.

Besides line breaks Dos2unix can also convert the encoding of files. A few DOS
code pages can be converted to Unix Latin-1. And Windows Unicode (UTF-16) files
can be converted to Unix Unicode (UTF-8) files.

Binary files are automatically skipped, unless conversion is forced.

Non-regular files, such as directories and FIFOs, are automatically skipped.

Symbolic links and their targets are by default kept untouched. Symbolic links
can optionally be replaced, or the output can be written to the symbolic link
target. Writing to a symbolic link target is not supported on Windows.

Dos2unix was modelled after dos2unix under SunOS/Solaris. There is one
important difference with the original SunOS/Solaris version. This version does
by default in-place conversion (old file mode), while the original
SunOS/Solaris version only supports paired conversion (new file mode). See also
options "-o" and "-n". Another difference is that the SunOS/Solaris version
uses by default iso mode conversion while this version uses by default ascii
mode conversion.

Features

  • Native language support.
  • Automatically skips binary and non-regular files.
  • In-place, paired, or stdio mode conversion.
  • Keep original file dates option.
  • 7-bit and iso conversion modes like SunOS dos2unix.
  • Conversion of Unicode UTF-16 files.
  • Handles Unicode Byte Order Mark (BOM).
  • Display file information.
  • Secure.

Project information

Maintainer: Erwin Waterlander waterlan@xs4all.nl
Git: git clone git://git.code.sf.net/p/dos2unix/dos2unix
Home page
SourceForge
ChangeLog
NEWS

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.