I need help recovering files lost during cut and paste process. I cut a bunch of files (photos, videos, documents) from my main SSD drive (where Fedora is installed) and intended to paste them onto an external drive. At the end of the process, I got an error message (I don’t remember what it was exactly). Some files are pasted to the external drive. However, many of the files “disappeared”, the missing files are neither on the destination external drive nor on the origin main SSD drive.
Please, do you know how I can recover the files “lost” in the process?
Can I recover files cut but not pasted?
Can I undo a cut/paste process?
Thank you all.
Since the cut and paste while moving files between drives is not just a matter of the clipboard, but also involved with disk io and caching I would suspect that once written in the cache the origin feels the copy is done and then moves on to the next file.
An error that loses the file after it is written to cache and before actually written to the external drive would lose the file totally.
I never use cut and paste for that but rather use a more refined tool such as rsync which has an option to verify the write during the copy and I can delete the file later after the copy is verified intact.
--remove-source-files sender removes synchronized files (non-dir) is shown as one of the available options for rsync in the man page, and seems to imply that once written and verified then rsync will remove the original file. I don’t know how that would play out with writing to cache and then a destination error causes loss of data in the cache.
The only certain way to verify the move is correct and complete would be to copy the files, verify them, then delete the source. Alternatively the copy could be done without using the default io write cache process but that is not trivial IMHO.