0

I'm using LibreOffice 6.0.7.3 on Ubuntu 18.04.

I moved a LibreOffice Calc file from one folder to another in the GUI file manager (Nemo 3.6.5). The file appeared to move from one folder to the other successfully. When I double-click on the file to open it, an error appears

The Link "file.ods" is Broken.  Move it to Trash?

If I open LibreOffice Calc from the menu and attempt to open the spreadsheet using File > Recent Documents, I get the error

General input/output error while accessing file.ods

If I examine the folder where I moved the file to using the terminal, the file appears as a link to itself:

~/spreadsheets$ ls -Alh
lrwxrwxrwx 1 user user   48 May 10 08:36 file.ods -> /home/user/spreadsheets/file.ods

The file is not in Trash.

Please help me recover the contents of this file. It is very important, bordering on urgent.

Edit Many programs keep a cache of the content of recently-accessed files. If either LibreOffice or Ubuntu do this, that's the first thing I'd like to know, because it's the first thing to check.

Darien Marks
  • 121
  • 6
  • If there is a *symlink* named `file.ods` and it points to a regular file `/home/user/spreadsheets/file.ods` and you manage to move the symlink to `/home/user/spreadsheets/` then it will overwrite its own target and become a symlink pointing to itself. `mv` doesn't let you do this but other tools may (I checked in Dolphin; it asked me if I want to overwrite though). If this is what happened to you then you should treat your precious file as accidentally deleted and perform whatever recovery procedure applies for deleted files. The first step: stop using the filesystem. – Kamil Maciorowski May 10 '21 at 13:29
  • Thanks, I think this must be what happened. The recovery procedure for deleted files is exactly what I'm asking for. The data must still be on disk somewhere, I need to know how to get to it. – Darien Marks May 10 '21 at 13:33
  • Does this answer your question? [How do I recover lost/inaccessible data from my storage device?](https://superuser.com/questions/241817/how-do-i-recover-lost-inaccessible-data-from-my-storage-device) – Kamil Maciorowski May 10 '21 at 13:36
  • I don't think so. Those are for disk failure and data corruption. I don't have those conditions, so if there's something on the disk for those methods to find, I should be able to find it without them. – Darien Marks May 10 '21 at 13:55
  • [`photorec`](https://superuser.com/a/987169/432690), [`foremost`](https://superuser.com/a/1273326/432690). – Kamil Maciorowski May 10 '21 at 13:57
  • The photorec section says to boot from a live USB and to install `testdisk`. Do I install `testdisk` on my current system before rebooting into the live USB, or do I do that after I've loaded the live USB? – Darien Marks May 10 '21 at 14:01
  • `photorec` was unusable for multiple reasons, and it was a massive pain in the ass to get it working even to the point of failure. `foremost` also doesn't work, but I'll need to post a separate question about why. – Darien Marks May 10 '21 at 21:40
  • Separate question: https://superuser.com/questions/1648206/how-can-i-make-foremost-work Long story short, both `photorec` and `foremost` are typical unusable open-source garbage and useless at returning even files that I know for a fact are present, much less the missing file. So, to answer your question: No, your link does not answer my question. – Darien Marks May 11 '21 at 12:06

0 Answers0