Can I view doc files from terminal

Sometimes I'm working from terminal for long periods of time and I come across a doc file I don't recognize. I've been trying to figure out how to view it instead of opening up word.

I've tried cat but it jumps into binary and my terminal goes nuts.

Is there a way I can do this from terminal?

---------- Post updated at 02:26 PM ---------- Previous update was at 02:24 PM ----------

Forgot to put this in the General UNIX Questions forum. Apologies, can someone move this.

You can use an app called antiword: Antiword: a free MS Word document reader

1 Like

wv is another tool you should look at (available in most distros of Linux), see wvWare, library for converting Word documents

Oh.. and even better, abiword... it supports old Word and the newer OXML formats as well.

abiword --to=txt --to-name=mytest.txt TheDoc.docx

1 Like

Another option that *may* work with some documents: the strings command. It will extract any text strings from a file and leave out all the other stuff.

strings <filename> | less
1 Like

I just found an interesting tool from the apple developer site called textutil that's built in OSX. Apparently it wasn't added until OSX 10.4. Thought this was interesting.

Just thought I would put my findings here if anyone has the same question. Below is the following link or just type the following command.

Terminal Command:
man textutil

Link:
Loading