0

How can I unlock the file below on Mint 19?

enter image description here

This is a LibreOffice document I had opened when my PC crashed.

2
  • 1
    Could you edit your question to say which application you are trying to open the file with. Also you might want to explain why you want to forcibly unlock the file. Feb 6 '19 at 13:30
  • Your answer below has already solved my problem. Thank you! The application was LibreOffice on host Mint. My PC had crashed when I was editing the file in question on guest Windows in VirtualBox. Feb 6 '19 at 14:40
3

Linux has no unified locking mechanism on files. There are various types of advisory locking mechanisms but they don't work on all file systems. This means applications usually use their own mechanism. The most common trick is to create a hidden "lock" file next to the original. If the hidden "lock" file exists, the application will refuse to open the file.

See here for LibreOffice: https://ask.libreoffice.org/en/question/110863/files-locked-for-editing/

Ususally you would remove the lock by closing the application, but with lock files, the application can crash without first removing the file. If this happens you have to remove the file manually.

I suggest you try to view hidden files in the same directory and look for a file named something like:

.~lock.1 Mint 2019.odt#
0

LibreOffice files when opened create locks, so only one user at a time can change things.

IF LibreOffice closes with files open, the locks remain, so to find any locked files, self uses terminal:

COMMAND: find ~/ | grep '.~lock'

This quickly shows any open which then can delete.

1
  • Thank you very much! May 11 '19 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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