Ubuntu18.04系统如何用unix2dos将unix格式文件转为dos格式
发布时间:2022-12-20 11:34:06 来源: 纵横云
Ubuntu18.04系统如何用unix2dos将unix格式文件转为dos格式
在windows中创建的文本默认为dos格式,而在linux系统中创建的文本默认为unix格式。各个平台使用的文本编码规范不同,同一文本在不同系统中显示有时候会发生一些莫名其妙的状况,因此有时需要对文本格式进行转换。那么在ubuntu18.04中如何用unix2dos将unix格式文件转为dos格式呢?本文给出详细说明。
1.更新软件列表
sudo apt update

2.安装dos2unix
sudo apt install dos2unix

3.使用unix2dos对文件进行转换
vi test.txt
可以看到文件为默认unix格式
unix2dos test.txt
本文来源:
https://www.zonghengcloud.com/article/8882.html
[复制链接]
链接已复制