Libre Office lockfile

I have somehow locked a Libre Office spreadsheet and can't find what is locking it.

Any suggestions?

I'm supposed to run this:

find /path/to/files -name '.~lock.*'

but nothing has turned up so far.

Can I start up Libre Office to ignore lock files?
 
Except it does work.
It depends on the shell. For instance shells/zsh (at least in its default configuration) complains if nothing matched and does not execute the command, but POSIX™‑compliant shells:​
If the pattern does not match any existing filenames or pathnames, the pattern string shall be left unchanged.​
Provided that no* pathname matched abc*, the command will work as intended. Obviously you do not want to rely on the nonexistence of files; balanga could theoretically run find(1) from a working directory coincidentally containing a .~lock.* file. Hence putting the ‑name pattern in single quotes is the most reliable way.
*) If there is a single match, the command will run, but this is most likely unintended.
[…] I'm supposed to run this: […] find /path/to/files -name '.~lock.*'
As far as I recall from OpenOffice.org times the .~lock.* files appear in the same directory as the document you are editing is located in. You did not have to scour the whole file system.​
 
I run find without quotes all the time and it finds all instances of every file every time without issue. I use the built in shell. I never have any issues.
Now I'm not talking about running it in a shell program and neither is the OP.
 
I run find without quotes all the time and it finds all instances of every file every time without issue.
That's the worst part, when it fails it may well find results, but not all that it should.

For example:

find ./ -name 'foo*'
./a/foo
./a/foo123
./foo

$ find ./ -name foo*
./a/foo
./foo

What happened here is that, in the second example, the shell expanded foo* to match foo in the current directory; find is then looking for a file with the exact name of foo, not one matching the original glob.

If you find it works most of the time, you are probably using bash. If it finds no match on the glob it passes it though as an argument, allowing the application to processes it. It's trying to be helpful, but it trains the user to do the wrong thing.
 
Back
Top