Name

dos2unix

Synopsis

    dos2unix [options]dosfile unixfile

Solaris and GNU/Linux only. Convert files using the DOS extended character set to their ISO standard counterparts. If dosfile and unixfile are the same, the file is overwritten after the conversion is done. See also unix2dos.

Solaris Options

-ascii

Remove extra carriage returns and convert (remove) DOS end-of-file characters for use under Unix.

-iso

Same as the default action.

-7

Convert 8-bit DOS graphics characters to space characters.

GNU/Linux Options

-cmode, --convmodemode

Set the conversion mode to mode. Possible values are ASCII, 7bit, ISO, and Mac. The default is ASCII. This emulates the Solaris version of dos2unix.

-h, --help

Print a command-line summary and exit.

-k, --keepdate

Make the modification date of the output file be the same as that of the input file.

-ninfile outfile ..., --newfileinfile outfile ...

New file mode. Filenames must be provided in pairs: the first one is the input file, the second is the output file.

-ofile ..., --oldfilefile ...

Old file mode. Each input file in converted in place. This is the default.

-q, --quiet

Do not print any warnings or messages.

-V, --version

Print version information and exit.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.