rm: cannot remove 'file': No such file or directory

Sekhemty

I need to delete some files under Linux, but when I try to do so, I always get the same error: rm: cannot remove 'file': No such file or directory. The problem is that the said files are visible with every file manager and with ls, and I can even open it with their respective applications (i.e. I can open and read text files with Kate, images with Gwenview, and so on); so I can't understand why when I try to delete them, they are marked as non-existent.

If it is helpful, these are backup files, they are on a removable NTFS hard-disk and they are all inside the folder of a failed backup task; they were created by Back in Time: this program works by comparing subsequent backups and hardlinking when files are not changed in order to save space; I suppose this has something to do with the current problem.

How can I delete these files? I tried to use rm -f without any success (even with sudo). They are still there and they are still non-existent; even under Windows, I was unable to delete them; what else can I try to do?

P.S. I've already asked advice to Schrodinger's Cat, with no success.


Here is a sample of the names of these files:

rcb-ScrollBarH_bar_focus.png  rcb-separator_vertical.png  ScrollBarNib.png  thumbborder-thin-black.png
rcb-ScrollBarV_bar_focus.png  scrollbarh_bar_focus.png    scrollbarv.png    thumbborder-thin.png
Germar

First of all please check if your filesystem is consistent. As you use NTFS you should better do this on windows.

BackInTime changes permission of all files and folders so you can't accidentally change or remove your backup. Please use either BackInTimes GUI to remove the whole snapshot or parts of it, or change permissions first:

find /path/to/backintime/HOST/USER/PROFILE/SNAPSHOTID/backup -type d -exec chmod u+wx {} +
rm /path/to/backintime/HOST/USER/PROFILE/SNAPSHOTID/backup/file/to/remove

Edit

According to your comment your drive was already inconsistent. This means other files could be corrupt, too. rsync normally compares only files size and modification time to decide whether a file needs to be synced. This will not detect corrupted files.

So please take one new snapshot with

backintime --profile-id 1 --checksum --backup

for all profiles. This will take ages but in the end your backup will be safe again.

Disclaimer: I'm the current main Dev of BackInTime

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related