Abschweifen

A wiki for things I knew and already forgotten. Written in pure HTML. Inspired by Bits from Debian.

If you have any questions or comments, you can contact me on Mastodon.


Permanently delete with command shred (posted on 16.02.24)

shred - Overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.

To permanently delete all files within a folder (e.g. Documents) and subfolders, use the following command:

find Documents/ -type f -exec shred -uvz {} \;

After the command has been executed, all files are irretrievably deleted. Only the (sub)folders remain. To delete the empty (sub)folders, use the follwoing command:

rm -r Documents/


You can also use shred to permanently delete one file only:

shred -uvz example.txt

Default overwrites file always three times; u - deallocate and remove file after overwriting; v - show progress; z - add a final overwrite with zeros to hide shredding