---
title: "dos2unix 命令"
author: "lionbule"
date: "2013-02-28T16:08:36Z"
tags: []
categories: ["操作系统"]
slug: "dos2unix"
draft: false
lastmod: "2013-02-28T16:08:36Z"
id: 1817975
url: "https://lionbule.iteye.com/blog/1817975"
---

dos2unix 主要解决特殊字符的问题

 

简单的用法案例：

$dos2unix xxx.txt

 

**help信息：**

$ dos2unix -h

dos2unix Copyright (c) 1994-1995 Benjamin Lin

         Copyright (c) 1998      Bernd Johannes Wuebben (Version 3.0)

         Copyright (c) 1998      Christian Wurll (Version 3.1)

Usage: dos2unix \[-hkqV] \[-c convmode] \[-o file ...] \[-n infile outfile ...]

 -h --help        give this help

 -k --keepdate    keep output file date

 -q --quiet       quiet mode, suppress all warnings

                  always on in stdin-&gt;stdout mode

 -V --version     display version number

 -c --convmode    conversion mode

 convmode         ASCII, 7bit, ISO, Mac, default to ASCII

 -l --newline     add additional newline in all but Mac convmode

 -o --oldfile     write to old file

 file ...         files to convert in old file mode

 -n --newfile     write to new file

 infile           original file in new file mode

 outfile          output file in new file mode