Ubuntu: Installing todos & fromdos

by on Dec.26, 2010, under Linux (Ubuntu)

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:

todos myfile.txt

(If you wish to use the file on a DOS OS)

fromdos myfile.txt

(If you copied a file from a DOS system and would like to use it on a Unix one)

Leave a Reply


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!