How remove a lock?

Using Gnome on Leap 15.6. :sunglasses:

I have an external hard-drive for important files.
Yes, i had been stupid enough to remove that hard-drive without unmount before removing the external hard-drive from the USB after having had a file loaded and closed.

Now i am having first time a lock on the file’s directory and cannot access anything:

How can i remove that lock and access my file again?

I am not a Terminal Guru and checking Google did not give me anything feasible yet. I am really sweating here. :grimacing:

Meanwhile i was able to get into the directory via Terminal and copy the file in question to a different location, where i had been able to open it.

But the directory is still not accessible neither with Files nor Gnome-Commander. Why??? :cry:

If “removing that lock” means removing the file /run/media/bierpizzachips/EXCHANGE/EXCHANGE_DIR/DOCUMENTS/OVERVIEW/.~lock.OVERVIEW.xlsx# you can open a terminal and issue:

sudo rm /run/media/bierpizzachips/EXCHANGE/EXCHANGE_DIR/DOCUMENTS/OVERVIEW/.~lock.OVERVIEW.xlsx#

(I think easy enough even for “no Terminal Guru” ?)

The file path should be put in " " or ' ' or the removal will fail.

Check with Gnome Disks (just look for Disks in the menu) if the drive can be seen and if anything is wrong with the partition involved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.