Closed jcharbo94 closed 2 months ago
It's hard to say what it could be from this bug report. fdupes uses remove() to delete each file, and that can fail for a number of reasons beyond fdupes' control so it's hard to tell without looking at the error code returned by the operating system (which fdupes, unfortunately, does not print out).
Another thing to consider: The latest versions of fdupes will check to make sure that a file's content hasn't changed between the moment the file is scanned and the moment it gets deleted, so if the files can change during execution that would be a possible cause. Running fdupes with --log enabled may help reveal whether this is the case.
I'm getting this error too, for any file I try to remove with fdupes.
Steps to reproduce:
mkdir test && cd test
echo hi > fileA
cp fileA fileB
fdupes -d .
fileA
for keeping and fileB
for deletion prune
Expected behaviour: fileB
should be removed
Observed behaviour: Get error: Deleted 0 files (occupying 0 bytes); 1 failed.
exit
and then yes
to exit fdupes.rm fileB
Now fileB
is deleted.
I'm getting this error too, for any file I try to remove with fdupes.
Steps to reproduce:
mkdir test && cd test
echo hi > fileA
cp fileA fileB
fdupes -d .
- Press shift+right and then shift+left to select
fileA
for keeping andfileB
for deletionprune
Expected behaviour:
fileB
should be removed Observed behaviour: Get error:Deleted 0 files (occupying 0 bytes); 1 failed.
- Enter
exit
and thenyes
to exit fdupes.rm fileB
Now
fileB
is deleted.
I followed this exact sequence of steps and was unable to reproduce the issue. The file 'fileB' is deleted without a hitch on my system. I think it may be helpful to indicate which system you're running this on so that somebody running fdupes under a setup similar to yours might be able to investigate.
Sorry, should have included my system info in my original message: I'm running fdupes 2.2.1 installed via pacman
on Arch Linux running on a Raspberry Pi 4. Let me know if there's any more info I can provide to help diagnose the problem.
To be clear, I wasn't expecting the Steps to Reproduce to fail on anyone else's machine: fdupes won't delete any files on my machine, so it seems like something more fundamental is going wrong. I was hoping just to be able to rule out PEBKAC as the issue!
I ran a fdupes of with two folders, found 1000+ duplicates. Double checked, they are indeed duplicates. I went ahead and selected all the ones I wanted to delete. Typed "prune" - it failed to delete most of it. Re-ran on a sample of 2, to see the error message, it's not very descriptive: Deleted 0 files (occupying 0 bytes); 2 failed.
I checked the permissions, tested with the same user to rm the file, it worked. I'm very confused on why fdupes is failed. I can't find anything to help me understand.