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
-c
mode
,--convmode
mode
Set the conversion mode to mode. Possible values are
ASCII
,7bit
,ISO
, andMac
. The default isASCII
. 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.
-n
infile outfile
...,--newfile
infile outfile
...New file mode. Filenames must be provided in pairs: the first one is the input file, the second is the output file.
-o
file
...,--oldfile
file
...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.