debian dos2unix

debian system opens the text file generated in Windows, appears at the end of each line '^ M'

reason is Linux and Windows are different from the carriage

in the carriage return is Windows \ r \ n line breaks

in Linux a carriage return \ n

simplest and most common solution is to use the command to convert dos2unix: dos2unix filename

under Debian dos2unix and unix2dos commands tofrodos package

installation: apt-get install tofrodos

after installation and discovery with dos2unix still can not use unix2dos the original is in debian no longer friends with this command,

$ dpkg -L tofrodos
/.
/ usr
/ usr / bin
/ usr / bin / fromdos
/ usr / report this content share
/ usr / report this content share / man
/ usr / report this content share / man / man1
/usr/share/man/man1/fromdos.1.gz
/ usr / report this content share / DOC
/ usr / report this content share / DOC / tofrodos
/usr/share/doc/tofrodos/NEWS.Debian.gz
/ usr / report this content share / DOC / tofrodos /tofrodos.html
/ usr / report this content share / DOC / tofrodos / Copyright
/usr/share/doc/tofrodos/changelog.Debian.gz
/usr/share/doc/tofrodos/readme.txt.gz
/ usr / bin / Todos
/usr/share/man/man1/todos.1.gz
can see out into the todos and fromdos

 

Reproduced in: https: //www.cnblogs.com/yuanping/archive/2013/06/10/3130801.html

Guess you like

Origin blog.csdn.net/weixin_34353714/article/details/94067264
Recommended