I’m attempting to save a CSV using LibreOffice Calc to be imported to a MySQL database. Saving it as a CSV is pretty straightforward in LibreOffice but I don’t know how the resulting document expresses linebreaks?

My guess is that—since I’m using Ubuntu—it uses the standard Linux notation but I can’t figure out how to confirm that. Whenever I open the CSV in a text editor or use cat in the Terminal, it just shows an actual line break.

How can I confirm/check the notation being used?


Use the file utility like so: file <filename>

For files with *NIX line endings you should see "ASCII text".

For files with Windows line endings you should see "ASCII text, with CRLF line terminators".

You can of course use dos2unix and unix2dos to convert between the two.


You can use a hex editor and open the exported file, and see for yourself.

  • 1
    If you read the question carefully you'll clearly see that his OS is mentioned. – Karan May 29 '15 at 8:41
  • You're correct. I updated my answer. – SPRBRN May 29 '15 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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