# rm -P switch?



## michaelsanford (Mar 8, 2003)

I was curious about the wording of this in the rm manpage:

```
-P    Overwrite regular files before deleting them.  Files are overwrit-
           ten three times, first with the byte pattern 0xff, then 0x00, and
           then 0xff again, before they are deleted.
```
Presumably this is to add security so that undelete apps can't read the byte pattern from the hard disk but: It's overwritten 3 times _before_ it's deleted?


----------



## DeltaMac (Mar 8, 2003)

A file can't be overwritten AFTER it's deleted, can it?


----------



## michaelsanford (Mar 8, 2003)

I suppose you're right, I was just thinking that the file would be deleted, and the physical location of the file would be stored by rm and then overwritten; but I suppose that's crazy since rm probably doesn't have anything to do with the physical location of the file...


----------



## ex2bot (Mar 8, 2003)

Mike,

Your message fits better in the Mac OSX Unix & X11 forum, so I moved it there.

Have fun.

Doug


----------



## michaelsanford (Mar 8, 2003)

I just noticed that forum was unix (I only noticed the X11 in the title, not the "unix", and wondered where the Darwin forum went).

Sorry


----------



## scruffy (Mar 9, 2003)

Yes, that's so as to erase a file thoroughly, i.e. unretrievably.  This is similar to PGP's 'wipe' command.

Thanks for pointing out that option though


----------

