Replace bytes in big file using Linux command line

722 Views Asked by At

I have a set of big (>1Gb) binary files which was uploaded to FTP with incorrect line-ending. They contain "0D 0A" where should be "0D". Is there a way in Linux to replace all includings of bytes "0D 0A" to "0D" in command line?

2

There are 2 best solutions below

0
On

Yes. The name of the tools are:

fromdos

todos

They are in the package tofrodos in most distributions.

0
On

You can use the command dos2unix. The inverse is unix2dos, of course.