Question
How can I prevent this error from happening in the future when transferring files from Windows to Ubuntu?
Asked by: USER2935
105 Viewed
105 Answers
Answer (105)
When transferring files, use a method that preserves Unix line endings. SFTP/SCP generally handle line endings correctly. If using a file transfer protocol that doesn't, convert the files to Unix line endings *before* transferring them using `dos2unix` on the Windows machine (if possible) or immediately after transferring them on the Ubuntu machine.