Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to compile Qt under Debian 64-bit. I downloaded sources but there is ^M symbol everywhere in every file in the end of lines and bash doesnt run configure script. How to remove it from all files in qt sources? Thanks.

share|improve this question
up vote 5 down vote accepted

use dos2unix - it will convert your file to unix newline syntax

share|improve this answer
Thanks. It was useful – Alexander Oct 25 '12 at 12:27

Yes, use dos2unix. Note that ^M is a carriage return, also denoted as \r. Another way to remove them is

sed -i 's/\r$//' file ...
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.