Bootstrap

Linux命令(144)之unix2dos

linux命令之unix2dos

1.unix2dos介绍

linux命令unix2dos是一个用于将文本文件从Unix/Linux格式(使用LF换行符)转换为DOS/Windows格式(使用CRLF换行符)的命令行工具。

2.unix2dos用法

unix2dos [参数] filename

参数 说明
-o 不为UTF-8文件添加字节顺序标记(BOM)
-n 不覆盖原文件,而是写入新文件

如果你的系统中没有unix2dos命令,可以通过包管理器进行安装

命令:

yum install -y unix2dos

[root@patrolagent ~]# yum install -y unix2dos
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
rhel7                                                                                                                                                                | 4.1 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---&g
;