Need to delete file(s) for undeletion purpose 24 April 2023, 04:35:25 How/what operation can do deletion of file(s) with being in mind really for purpose of undeleting it/them later afterward ?need arose as way to do dd copying with some exclusion
Re: Need to delete file(s) for undeletion purpose Reply #2 – 24 April 2023, 12:38:44 Make a backup then do whatever you want. Otherwise, something might go wrong.
Re: Need to delete file(s) for undeletion purpose Reply #3 – 24 April 2023, 13:16:39 In most desktop sessions you can use trash-cli which does native xdg trash mgmt., but i would still excercise care.
Re: Need to delete file(s) for undeletion purpose Reply #4 – 24 April 2023, 13:18:34 fine, got at AUR:Code: [Select]extundeletebut it obliges user to do it offline, use rm then this
Re: Need to delete file(s) for undeletion purpose Reply #5 – 24 April 2023, 13:20:12 Extundelete and others would not work on any modern SSD, and possibly other flash media too. Use it on spinning hdd's only.
Re: Need to delete file(s) for undeletion purpose Reply #6 – 24 April 2023, 15:25:57 If you mean you want to securely wipe a drive, on an SSD you can use hdparm:https://archive.kernel.org/oldwiki/ata.wiki.kernel.org/index.php/ATA_Secure_Erase.htmlThis zeros the drive and is very fast.For spinning disks you can use:Code: [Select]# badblocks -w /dev/sd??But that might take a few hours depending on the drive size and speed. Could be days on multi TB drives! Some people reckon doing 4 overwrite runs is more than needed, that's forensic lab level protection, one would probably suffice if you wanted to speed things up. You can also specify a block range rather than a whole drive.For file recovery I use testdisk / photorec, it takes a bit of study to use it effectively but works well. Set only the file types you want to recover, not everything, to speed up the process. No point wasting time searching for weird file types (like eg. MS or MAC specific ones) that I don't have.I think you can dd files to a location outside of any partition, which won't normally get overwritten unlike inside one, if you mean you want to hide them, and keep a record of the block locations manually to dd them back later.