title: How to convert Windows end of line in Unix end of line (CR/LF to LF)
body: <p>I'm a Java developer and I'm using Ubuntu to develop. The project was created in Windows with Eclipse and it's using the <a href="https://en.wikipedia.org/wiki/Windows-1252" rel="noreferrer">Windows-1252</a> encoding.</p>
  <p>To convert to UTF-8 I've used the <em><a href="https://linux.die.net/man/1/recode" rel="noreferrer">recode</a></em> program:</p>
  <pre><code>find Web -iname \*.java | xargs recode CP1252...UTF-8
  </code></pre>
  <p>This command gives this error:</p>
  <pre><code>recode: Web/src/br/cits/projeto/geral/presentation/GravacaoMessageHelper.java failed: Ambiguous output in step `CR-LF..data
  </code></pre>
  <p>I've searched about it and get the solution in <em><a href="http://fvue.nl/wiki/Bash_and_Windows#Recode:_Ambiguous_output_in_step_.60data..CR-LF.27" rel="noreferrer">Bash and Windows, Recode: Ambiguous output in step `data..CR-LF'</a></em> and it says:</p>
  <blockquote>
  <p>Convert line endings from CR/LF to a
  single LF: Edit the file with Vim,
  give the command <code>:set ff=unix</code> and save
  the file. Recode now should run
  without errors.</p>
  </blockquote>
  <p>Nice, but I've many files to remove the CR/LF character from, and I can't open each to do it. Vi doesn't provide any option to command line for Bash operations.</p>
  <p>Can sed be used to do this? How?</p>