Dos2unix

From HalfgeekKB
Revision as of 04:54, 15 February 2016 by Psmay (talk | contribs) (Created page with "'''dos2unix''' is a utility that replaces the line endings in a file from DOS/Windows CRLF (<code>0D 0A</code>) to Unix LF (<code>0A</code>). '''unix2dos''' does the reverse,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

dos2unix is a utility that replaces the line endings in a file from DOS/Windows CRLF (0D 0A) to Unix LF (0A).

unix2dos does the reverse, replacing LF with CRLF.

By default, a named file is converted in-place, but stdio redirection can be used instead, and an -n switch can be used to specify separate in and out files. Options also exist for limited conversion among character sets. (TODO: Document these here.)

A lot of files can be converted at once using Find#dos2unix.2Funix2dos.