How to delete file permanentely so that no one can recover ?

How to delete file permanentely so that no one can recover ?

shred: Shred utility overwrites a file to hide its contents, and optionally delete it if needed. The idea is pretty simple as it overwrites the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data. By default file is overwritten 25 times. When you move your rented server you should consider running file shredding; otherwise new owner can get data including passwords.


1. Shred a single file;


Securely delete a file called /root/passwd.info:

#shred -u /root/passwd.info

You can add a final overwrite with zeros to hide shredding:

#shred -u -x /root/passwd.info


Where,
-u : Remove file after overwriting
-x : Add a zero to hide shredding
-n <Number> : Overwrite number of times instead of the default 25


2. To shred on entire partition;

#shread -n 30 -vz /dev/sdb

Comments

Popular posts from this blog

Recover or restore initramfs file in RHEL or CentOS 7

Space reclamation / UNMAP on RHEL or CentOS 7

How to recover /boot partition on RHEL or CentOS 7?