dos2unix on Ubuntu and Debian
DOS text files traditionally have a carriage return and line feed character as newline character or symbol – mostly for historic reasons i think. Unix and Linux on the other hand have a line feed character as newline character in text files – and Macs have yet another “standard”.
From time to time I need to convert from one text file “standard” to another.
Red Hat-based Linux distributions are normally distributed with a small tool called dos2unix, which is able to do the conversion job very easy, but Debian-based Linux distributions like Debian itself and Ubuntu do not include the dos2unix tool by default.
The dos2unix tool i available in the Debian / Ubuntu package called tofrodos. To install the packages just type:
aptitude install tofrodos
Once you have the tofrodos package installed you are able to use the dos2unix command from the command line, like this:
dos2unix dosfile.txt
After running the command all the historic and crappy windows newlines are gone.
Related posts:
- Recursive convert dos newlines to unix ones with dos2unix
- Howto: Create your own Debian or Ubuntu package repository
- Howto: Install Ruby and Rails on Debian or Ubuntu
- Bash shortcuts tips and tricks
- Ubuntu Howto: Install Oracle
- Howto install Sun Java on Debian Sarge
- Howto Install Oracle on Debian
- How to mount bin / cue image files in Linux
- Howto: Write Debian Package Descriptions
- Howto: Install Windows Vista Fonts in Ubuntu
Popular Related Items »
Incoming search terms
- dos2unix ubuntu
- ubuntu dos2unix
- dos2unix debian
- debian dos2unix
- ubuntu install dos2unix
- install dos2unix ubuntu
- ubuntu dos to unix
- dos2unix ubuntu package
- dos2unix for ubuntu
- debian lenny dos2unix
- ubuntu dos2unix install
- dos2unix debian lenny
- dos2unix install ubuntu
- dostounix ubuntu
- dos2unix ubuntu install
- ubuntu 9 04 dos2unix
- dos2unix debian package
- debian dos to unix
- dos2unix on ubuntu
- dos2unix package
- ubuntu dostounix
- ubuntu dos 2 unix
- ubuntu dos2unix package
- dos to unix ubuntu
- dos 2 unix ubuntu
- dos2unix in ubuntu
- dos2unix command ubuntu
- dos to unix debian
- dos2unix install
- lenny dos2unix
- debian dos2unix package
- dos2unix
- install dos2unix
- dos2unix command debian
- Install dos2unix in ubuntu
- unbuntu dos2unix
- debian dostounix
- debian package dos2unix
- dos2unix ubuntu 9 04
- dostounix debian
- ubuntu 9 10 dos2unix
- linux dos2unix package
- dostounix in ubuntu
- dos2unix on debian
- install dos2unix on ubuntu

Pages tagged "linux" said,
April 30, 2008 @ 15:49
[...] tagged linuxOwn a Wordpress blog? Make monetization easier with the WP Affiliate Pro plugin. dos2unix on Ubuntu and Debian saved by 5 others zilchnerd bookmarked on 04/30/08 | [...]