tags:

views:

85

answers:

2

In cygwin how do I check the file format of a file, how do I change the format from dos to unix?

This question has probably already been answered before, but I could not find the answer in previous posts

+1  A: 

The cygutils package has dos2unix and other such utilities. See this link for more details. Specifically:

One of the hassles of Unix-Windows interoperability is the different line endings on text files. As mentioned in the section called “Text and Binary modes”, Unix tools such as tr can convert between CRLF and LF endings, but cygutils provides several dedicated programs: conv, d2u, dos2unix, u2d, and unix2dos. Use the --help switch for usage information.

Brian Agnew
+1  A: 

The command file used like this

file file-to-check.txt

Will tell you what kind of line terminators are being used

I think cygwin has dos2unix and unix2dos

http://www.cygwin.com/cygwin-ug-net/using-effectively.html

Lou Franco