Hacker News new | ask | show | jobs
by aavotins 3686 days ago
Author himself stated that rm has a -P flag, that actually does the same thing more correctly and more securely:

>Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.

Plus the -P flag is available on both GNU and BSD versions of rm. Somehow I fail to see the user-friendliness factor.

Edit: formatting

3 comments

On OpenBSD, -P overwrites once. It used to be 3, like the author states, but was changed to one pass since multiple overwrites are pointless on mechanical disks. On SSDs you need ~20 passes of the entire drive to remove ~all data, so I doubt 3 passes of a single file on an SSD would accomplish what the person wants.

As an aside, it has never been demonstrated that multiple overwrites improve overwriting. In other words, it's never been demonstrated that data overwritten just once can be recovered. Until that happens I'll agree with other folks that multiple overwrites are a waste of time and electricity, and that FDE is a much more reasonable (not fool-proof, just reasonable) way to make data unavailable to unauthorized persons.

That actually seems to be a BSD extension not supported by GNU coreutils/fileutils.
> Plus the -P flag is available on both GNU ...

    [pritam@PritePad ~]$ cat /etc/lsb-release 
    LSB_VERSION=1.4
    DISTRIB_ID=Arch
    DISTRIB_RELEASE=rolling
    DISTRIB_DESCRIPTION="Arch Linux"
    [pritam@PritePad ~]$ touch t
    [pritam@PritePad ~]$ rm -P t
    rm: invalid option -- 'P'
    Try 'rm --help' for more information.
`man rm` does suggest looking at shred(1) in the SEE ALSO section