Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On Mac OS X there's a very handy command called textutil, that can be invoked from the terminal and allows to convert a document from a format to another; Sometimes I use it to convert a RTF file into HTML, but it's also able to convert doc, docx, odt and other formats.

I used to believe that it was a standard unix command, but I cannot find it and when I try to write sudo apt-get install textutil Ubuntu said that it have no idea of what textutil is... maybe I have searched in the wrong place for the command?

Do you know if something similar exists for Linux? I need to invoke that command from a script that will run on a linux server.

share|improve this question
2  
textutil relies on Cocoa frameworks, which is why it is only available for Mac OS X. –  bahamat Sep 16 '11 at 15:15
add comment

migrated from stackoverflow.com Sep 16 '11 at 14:00

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 8 down vote accepted

GNU unrtf does almost exclusively what you want.

Pandoc can do a lot more.

share|improve this answer
    
Thank you very much –  Cesco Sep 16 '11 at 15:07
add comment

unoconv can convert between OpenOffice.org document formats (ie. anything OOO can open).

Supported document formats include Open Document Format (.odt), MS Word (.doc), MS Office Open/MS OOXML (.xml), Portable Document Format (.pdf), HTML, XHTML, RTF, Docbook (.xml), and more.

I know it is in the Ubuntu repository, but you can get it from, and see more info at unoconv's homepage

share|improve this answer
    
Thank you for the answer –  Cesco Sep 18 '11 at 7:20
    
unoconv is also in Debian. This is where Ubuntu got it from. So if you have apt-get, this will work on recent systems sudo apt-get install unoconv: –  Christian Pietsch Jan 24 at 12:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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