Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 use Linux for hosting and editing code, but there are others at work that are using Windows. Sometimes they make the files have \r\n in them, and it's causing problems with version control.

Should they be using the ASCII mode in their FTP manager? Should that force the line endings to be \n when uploading from Windows to Linux?

share|improve this question
up vote 1 down vote accepted

ASCII mode works by converting all line terminators to \r\n in transit, and then having the receiving system convert this sequence to its native line-termination form.

So yes, if the files from the Windows users consistently have \r\n throughout, then uploading them in ASCII mode to a Linux box should result in the received files having \n throughout.

(I'm not entirely sure what would happen if the files have \n in some places and \r\n in others; you might then end up with the received files having extra CRs in some places.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .