Delete files securely on Unix

Standard way:

rm -rf file/folder

This is the easy way and quick way. But if you want to delete something that is hard to recover, then you need other tools.

shred, used to securely delete files and devices so that they can be recovered only with great difficulty with specialised hardware.

shred -f file

There is no option to delete folder ‘r’.

secure-delete, srm is a secure file removal utility.


sudo aptitude install secure-delete

To remove:

srm -r pathname

Shred’s default is twenty five but secure-delete uses thirty eight.

Ref: how-to-shred-a-folder, shred_and_secure_delete_tools_wiping_files_partitions_and_disks

comments powered by Disqus