DOS & UNIX文件格式转换

时间:2023-03-10 07:09:03
DOS & UNIX文件格式转换

1、使用vi编辑器

vi  xxxx
:set fileformat=unix(or dos)
:wq

2、使用 dos2unix

这个只能把DOS转换成UNIX文件
. sudo apt-get install dos2unix
. dos2unix xxx(文件)

3、使用 tr

只能DOS转UNIX
$ tr -d '\r' <dosfile> unixfile

4、使用 UltraEdit
文件 -> 转换

DOS & UNIX文件格式转换