HOWTO Convert carriage returns between UNIX and DOS on Debian

This article was first written in February 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/203).

The convert carriage returns between UNIX- and DOS-kind of CR, use the tools dos2unix and unix2dos from the sysutils package.

Usage is really simple:

$ dos2unix filename

or

$ unix2dos filename

where filename is the name of the file to convert.

To convert a hierarchy of files starting from current directory:

$ find . -type f -exec dos2unix {} ;

For more information see the manpages.


Related Posts

HOWTO Build current XAMS Debian packages

This article was first written in September 2004 for the BeezNest technical website...

HOWTO Setup Bonding Ethernet on Debian with a 2.6 kernel

This article was first written in October 2004 for the BeezNest technical website...

4 Comments

Comments are closed.

Quick Contact Form