How does krusader delete file(s)/directory trees under the hood?

Some weeks ago, I did an accidental delete of the home directory tree on a Kubuntu 24.04 machine (more on how and what in a subsequent post if that makes sense). Because of an unexpected pattern after this mass deletion, yet I’m going to ask whether a plain rm -r is going on while a deletion via mouse context menu is started or an own (internal) Krusader deletion process does this job. An answer to this question might help in applying an appropriate recovery strategy with the help of the journal.

The curious thing is: virtually the whole directory tree itself is not deleted, but the files. I could say that I only see a skeleton - that once had been a ‘living’ entity with flesh. All the directory entries with deleted files in it have become the date (mtime) of the deletion of the underlying files. Yet shortly after the deletion started, I realized what was going on, and I terminated Krusader just during the process. Shortly thereafter I forced the notebook to power off in order to later save the (separate) home partition using a live USB-stick boot session.

It seems that Krusader separates tree deletion (from a single selected directory node) in two subsequent steps: first the files, then the directory nodes. Related to recovery strategy considerations: can anybody tell me more about that?

I always set it to this. Exactly because otherwise it just deletes stuff without an option to recover.

Nice answer.

I always enjoy when e.g. mailers offer shortkeys as Del for trash and shift+Del for delete. In many cases I know that anything is not subject to possible restoration. Anyway, Krusader makes it less simple to accidentally remove files because a keyboard shortcut is present only for the trash operation (and even then it asks you if you’re sure to put anything to trash).

In my case, the deletion was not accidental in the sense of having hit the false shortkey, but because I was convinced that I was going to delete a symbolic link, in a case where Wine was creating anything like this in a /var/run subpath, after (repeatedly) doing a certain operation. I removed it after my Wine operations were finished.