Can I view doc files from terminal


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can I view doc files from terminal
# 1  
Old 07-30-2013
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.
# 2  
Old 07-30-2013
You can use an app called antiword: Antiword: a free MS Word document reader
This User Gave Thanks to in2nix4life For This Post:
# 3  
Old 07-30-2013
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

http://www.abisource.com/

Last edited by cjcox; 07-30-2013 at 05:47 PM.. Reason: adding abiword info
This User Gave Thanks to cjcox For This Post:
# 4  
Old 07-30-2013
Another option...

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.

Code:
strings <filename> | less

This User Gave Thanks to SndChaser For This Post:
# 5  
Old 07-30-2013
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…
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to merge two .doc files from different servers.?

Folks, I would like to know how to merge two .doc files from different servers. For example, df -h > host1.doc --> from host1 df -h > host2.doc --> from host2 Now i want to merge these different server details into single .doc file. Pls let me know, if any questions... Regards,... (2 Replies)
Discussion started by: seenuvasan1985
2 Replies

2. Programming

Is it possible to change search inside .pdf or .doc files?

the titele was wrong ... the true one is: Is it possible to search words inside .pdf or .doc files? is it possible if i changed the word into binary combination:eek:? and this way is super too hyper huge of greatest codes i ever seen:D to read only 1 word so is there any other ways:confused:? ... (1 Reply)
Discussion started by: fwrlfo
1 Replies

3. Linux

Find MSWord doc Files by Year and then Copy

I need to be able to find all *.doc files by year last modified and then perform an action such as copy to folder: /documents/2011 the 'find' command seems to show the path but not the full file details, which includes the date modified as the ls command does. I got this far with ls, but have... (2 Replies)
Discussion started by: jamarsh
2 Replies

4. Web Development

Help with opening/viewing doc file via linux terminal

I am currently trying to open a .doc file in my workstation via terminal. This is my code: root@ojt:/home/ojt/Desktop# cat arts_life.doc and it gave me a bunch of unknown characters together with the contents of the doc file. What I actually want to happen is that it will open the... (4 Replies)
Discussion started by: chams
4 Replies

5. UNIX for Dummies Questions & Answers

Help with opening/viewing doc file via linux terminal

I am currently trying to open a .doc file in my workstation via terminal. This is my code: root@ojt:/home/ojt/Desktop# cat arts_life.doc and it gave me a bunch of unknown characters together with the contents of the doc file. What I actually want to happen is that it will open the... (2 Replies)
Discussion started by: chams
2 Replies

6. UNIX for Advanced & Expert Users

unix command for terminal - view sequences as a single line?

Hello, I'm looking for some code that will list sequences of files as a single line. ie, sequences of files like this: filename.1.ext filename.2.ext filename.3.ext filename.4.ext filename.5.ext filename.6.ext filename.7.ext filename.8.ext filename.9.ext filename.10.ext would... (6 Replies)
Discussion started by: kentm
6 Replies

7. UNIX for Dummies Questions & Answers

rusty with cp command -- how to cp all .doc files with .txt extension

I'm rusty with cp, so I was wondering: is it possible to cp all the .doc files in a folder and make them .txt files? Can you use cp to do that? (3 Replies)
Discussion started by: Straitsfan
3 Replies

8. UNIX for Dummies Questions & Answers

To view compressed files

Hello All I compressed a file hello by using compress command compress hello ( enter ) i got the file as hello.z 1. My question is how can i see the file hello.z 2. How can i uncompress it back to change it to filename hello thanks (4 Replies)
Discussion started by: supercops
4 Replies

9. Shell Programming and Scripting

To view .gz files without decompressing it

hi, I have a file called Archiver1.gz how to view this file without doing gunzip on it i.e. decompressing it i tried this command but its not working: gzcat Archiver1.gz | tail -10 (4 Replies)
Discussion started by: ali560045
4 Replies

10. Shell Programming and Scripting

View files in columns

Can some on say how in simplest way to implement the following: I have two files: 1) some some some 2) another another another I need to get third file: 3) some another some another some another (1 Reply)
Discussion started by: mirusnet
1 Replies
Login or Register to Ask a Question