Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(This is Lubuntu 13.04)

I have a damaged .doc (word) file, made with abiword. The power went off, and damaged the file. I tried reading it in libreoffice as well. Any advice on how repairing this file on Ubuntu?

share|improve this question
what happens when you try to open it with libreoffice? is there any recovery screen? – philshem May 12 '13 at 23:00
This is what libreoffice says: File format error found at 151,163 (row, col). Now file recovery dialog opens! – kjetil b halvorsen May 12 '13 at 23:12
Did you try using the recovery dialog? – haneefmubarak May 12 '13 at 23:40

You might be able to salvage some of the text. Try running this command in a terminal:

strings foo.doc > output.txt

Then open output.txt in a text editor to see the results. (Note that this particular command will only work with .doc files, and not the newer .docx format.)

To filter only strings of at least ten characters:

strings -n10 foo.doc > output.txt
share|improve this answer
strings foo.doc > bar.doc to output all in a doc. less may not be good when a lot of useful text recovered is separated into short lines of 5-6 characters – cipricus Feb 24 '15 at 17:18
@cipricus: Good point, thanks! I've updated the answer for future visitors. – ejno May 10 '15 at 20:04

protected by fossfreedom Jun 17 '13 at 22:24

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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