0

My sister asked me to back her photos up to my external HDD and to format his laptop. Days later, my external HDD suffered a fail, resulting in loss of photos. I used Windows' Recuva, Linux's RD-Linux and TestDisk/PhotoRec, and Disk Drill's macOS to recover the photos, but it also recovered a lot of unnecessary files and it fattened another HDD with more than 1GB, taking a lot of time. I took other more than 5 hours to select less than 4 thousands photos among many and many unnecessary files.

I wanted only the unnecessary files to be permanently erased and to make them unrecoverable for optimising the recovery search on an HDD and not fattening another HDD, while the necessary files that I can recover, will not be permanently erased.

The problem is 1, 2 and 3 modes and the speed up.

  • I used shred -uvz -n 3, but as I am shredding a specific folder full of unnecessary files which sums more or less than 6GB, it took 3 days, and still is taking time. I read that -z speeds down and takes a lot of time, according to https://superuser.com/a/136390/976559.
  • I used secure-delete, and I saw srm offers only 2 or 38 modes. I would not opt for 38 modes, but I am not sure if only with 2 modes, the unnecessary files will remain unrecoverable or any recovery tools can recover them.
  • I used wipe -rfi, but I am not sure if wipe really makes them unrecoverable.

In all these cases, speed is not good and takes a lot of time.

I had an idea:

  • I cut the unnecessary folder from my HDD (let us call Adata) and pasted on my USB drive stick;
  • I cut the folder on my neighbour's another OS of his another computer and delete it normally.

(Observe that as for this idea, I am not worried, because that unnecessary folder is not anything sensitive, I want just to optimise the HDDs and the recovery search)

But I am not sure that if I cut, the unnecessary folder in my Adata HDD, it can still be recovered by any recovery tool.

I have been suggested to use rysnc, but rsync does not cut-paste, it copy-pastes. If rsync really cut-pastes, I am not sure that it still can be recovered.

I also am not sure that if only with 1 or 2 modes, the files will be recovered easily. I only know that between 3 and 38 modes, they are made unrecoverable.

Oo'-
  • 103
  • 3
  • @DavidPostill, my case is totally different of the case in that question. You really did not read attentively the whole detail. That question is about recovering the full drive, not about erasing securely and quickly a specific folder of unnecessary files in the present and recovering few necessary files of a full drive in the future in short time. – Oo'- Nov 03 '19 at 09:41
  • No it's not as you are ignoring the most important piece of advice (which is in the question) - **The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.** – DavidPostill Nov 03 '19 at 09:42
  • Sorry for my skepticism. Does erasing securely, even if with full care, **_only ONE_ specific folder full of unnecessary files** (**not** a full drive) with 3 modes **really overwrite** the **full** drive, **including** the unnecessary files and ruin the chance of recovering only the necessary files that I **_did not_** erase securely? Is this an i/O? – Oo'- Nov 03 '19 at 10:21
  • If a disk is in the process of failing then any I/O can speed up the failure up to the point where it will stop working at all. That's why the duplicate question highly recommends making a disk image of the failing disk and then using that for the recovery. – DavidPostill Nov 03 '19 at 12:04
  • You were right. I have talked with several Linux experts in shredding and recovery. Erasing and recovering is a big waste of time. The ideal is to make back up the important files to the clouds. I know that, in the future, Google, Mega and Microsoft can go bankrupt and/or defunct, then I can lose the clouds, therefore, I have to purchase more than 3 micro-SDs or SSDs for backup. Why more than 3? Because one of them can suffer a fail. I will avoid HDDs. I will choose NTFS, although NTFS be slow. You can close my question now. I am sorry! – Oo'- Nov 03 '19 at 13:54

1 Answers1

0

if it's a solid-state drive use fstrim to discard the data in the no-longer used data.

or if it's a magnetic disk fill the free space with zeros.

dd if=/dev/zero of=/mnt/dummy.dat
rm dummy.dat

Or if the drive is empty (or you want it to be empty) you could do an ATA secure erase often this completes in a few seconds, but it may take hours. After secure erase the drive will be blank and will need to be reformatted.

Jasen
  • 1,516
  • 10
  • 10
  • Is it possible to use `fstrim` and `dd` to erase a specific folder of unnecessary files instead of a full drive? Because if a full drive, I will not be able to recover the necessary files. – Oo'- Nov 03 '19 at 08:40
  • fstrim (and the dd command) only clears unused space, erase the files using a quick erase command (like rm) and then clear the free space using fstrim or dd dd will be slow as it has to write all the unused space... but potentially faster than a secure delete because it only writes once and only writes one file. – Jasen Nov 03 '19 at 23:21