~lock.filename.odt#

I found ~lock.filename.odt# as one of my files. I did not see it in my documents folder. I realized that I have it when I found Spideroak tried to backup the file. Can somebody explain, what does it mean? Why I couldn’t find it in documents folder? Will it affect the original file?

I’m using LO 4.4.3 and Ubuntu Gnome as my OS.

The lock file is created when a document is opened and normally deleted when the document is closed. It’s purpose is in a multi user environment to prevent more than one user to edit a document, which would create a problem. The first user to open the file will be able to edit the document but any subsequent users who open the document will be in read only mode.

There are times when the lock file may not be deleted - if AO or the OS lock up. In this case the file can only be opened in read only mode. The lock file needs to be deleted to get editing mode back.

Did you have the document open when you were backing up so that the lock file would be there? If not try to open the document now. If the lock file is there you will not be able to edit the file. The lock file will be in the same directory as the document. I don’t know Ubuntu but in Windows it is a hidden file and you need to set Windows to show hidden files.

I’m still be able to edit the file. I found the lock file, and then deleted it. But, every time I saved the file, the lock file will appear again.

Is the lock file still there after allowing a pause on closing Writer? What happens with any other LO files you open?

I just found out that it happens to my other odt files. When I close the file, the lock will disappear. It will be there if I save the file.

I just found out that it happens to my other odt files. When I close the file, the lock will disappear. It will be there if I save the file.

Following on from PeterWT’s answer, LibreO running on Ubuntu creates a hidden lock file, hence its name is actually .~lock.filename.odt# The first (.) indicates that it is a hidden file. The file will exist whilst you are actually editing the file, and will still be there when you save it. The lock file will disappear when you close the Writer window although the file manager may take a moment to reflect this change.

If the system shuts down whilst LibreO is running and the file is open, the lock file will likely still be there.

Will it affect the original file? I had tried to delete the lock file, but it is still there. As you said, every time I edit the file, the lock file will appear.

Following on from petermau’s answer, there is lock information kept within the ODT file as well as outside that file in the local lockfile + in the profile lockfile.

I’m currently editing a document under Debian 6.0 which I previously worked on under winXP. XP crashed whilst I was working on it & it was next visited under Debian. Attempting to open that file gave the following dialog message:

Document file ‘html5.odt’ is locked for editing by:
Alex Kemp ( 25.05.2015 13:34 )

It then offered:

Open document read-only or open a copy of the document for editing.

I chose the second option & have been adding to it ever since. The one strangeness is that I can no longer revert the new file’s name back to the old, as LO then thinks that I am attempting to open the old locked document.

The info given by the 2 Peters is perfectly accurate in my experience, and I thought to add some extra in the hope that it may be interesting.

Lock info:

Windows XP:
local lockfile: .~lock.html5.odt#

local lockfile contents:

{username}, {computer-name}/{user-short-name}, {computer-name}{time-stamp}{profile-lockfile-location}

actual local lockfile contents (example, different file):

Alex Kemp,DAVID/Alex,david,25.05.2015 13:34,file:///C:/Documents%20and%20Settings/Alex/Application%20Data/OpenOffice/4;

Profile lockfilename: .lock

Profile lockfilename contents:

[Lockdata]
User=DAVID/Alex
Host=DAVID
Stamp=38D0D54DAFCA1BD797B08396CA60D632
Time=Mon May 25 12:00:53 2015
IPCServer=true

Debian 6.0:
local lockfile: .~lock.html5.0.odt#

local lockfile contents: (identical format to XP)

Profile lockfilename location: /home/alexK/.config/libreoffice/4/.lock

Profile lockfilename contents: (identical format to XP)

Final comment: the XP lockfiles detailed above were not mounted when I attempted to load the XP-originated file. Thus, the information within the dialog could only have come from the .odt file, not the lockfiles. Spookily, I obtained the dialog text above by re-attempting to load the locked XP-file. It’s lockfile is open in my debian directory right now & has the identical content to the “actual local lockfile” quoted above, including Windows folder.

Lock file contents under Windows - “Author Name,Computername/Username,ComputerName,Date and Time,file:///C:/Users/Username/AppData/Roaming/LibreOffice/4;” There is another lock file pointed to by file contains [Lockdata]
User=Computername/Username
Host=Computername
Stamp=08D31B1C8FAF63DCAF74D51625900D14
Time=Wed Jun 17 18:26:44 2015
IPCServer=true
File name .lock
So its more complicated.

I have same type of file with the pdf, is it the same?
lock.filename.pdf#
Windows 10, libre office