Wednesday, September 13, 2006

Converting windows text files to linux compatible text files and vice versa

Don't you hate it when the line breaks get screwed up when you open a windows text file in linux, or a linux text file in windows?
This is the solution:

To convert a Windows file to *nix, enter:
dos2unix winfile.txt unixfile.txt

To convert a *nix file to Windows, enter:
unix2dos unixfile.txt winfile.txt

No comments: