How to convert file format in DOS to Unix and Unix file format to dos format? Use dos2unix package!
1) dos2unix = convert from DOS to Unix format
2) unix2dos = convert from Unix do DOS format
- we need package dos2unix:
yum install dos2unix -y
Conversion:
[root@localhost ~]# unix2dos 1.txt
unix2dos: converting file 1.txt to DOS format ...
[root@localhost ~]# vi 1.txt
A) we can see [dos] in vi editor
B) vi editor after :set ff?
More info about :set ff? - https://zapiskylinuxadmina.blogspot.com/2021/12/unix-format-or-dos-format.html
Žiadne komentáre:
Zverejnenie komentára