Line endings difference Windows <-> Linux

Christofer C. Bell christofer.c.bell at gmail.com
Mon Jun 10 18:50:00 UTC 2013


On Mon, Jun 10, 2013 at 1:38 PM, Bo Berglund <bo.berglund at gmail.com> wrote:

>
> So here is my simple question:
> Has Apache/PHP/MySql been adapted to accept all line ending systems
> around without breaking like in the old days?
> If that is so then I can stop worrying about line endings in the
> future. :-)



I can't answer your question, but I can say you might consider installing
the package dos2unix.  It includes the commands dos2unix and unix2dos for
converting the line endings in ascii files automatically.  I won't convert
what doesn't need converting, either.  So you can run "dos2unix" twice on
the same file and still have the Unix format file.  You can run it in
binaries (images, programs) and it won't corrupt them.

Convert your entire website at once:

$ find /var/www | xargs -r dos2unix

I hope this helps!

-- 
Chris

"If you wish to make an apple pie from scratch, you must first invent the
Universe." -- Carl Sagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130610/545d0365/attachment.html>


More information about the ubuntu-users mailing list