Whenever you create a text file with a Microsoft DOS based operating system and copy it to a Linux based system, you might discover that the file can’t be displayed properly. This is because most systems use different methods of character encoding. Additionally, Windows-Systems use different commands for the end of a line (CR + LF, Carriage Return + Line-Feed), while Linux-Systems only use LF (Line-Feed).
Fortunately Ubuntu offers several ways of convertig files to- and from DOS based operating systems. A command which comes with every Ubuntu distribution is iconv. It’s easy to use and works with both, 8-bit and 16-bit fonts. This article is about installing todos & fromdos though, and here’s how to do it:
In a terminal type:
apt-get install tofrodos
After it’s been installed either use:
(If you wish to use the file on a DOS OS)
(If you copied a file from a DOS system and would like to use it on a Unix one)