add whiteouts
[unix-history] / usr / src / bin / rm / rm.1
index 97c9717..928b3ce 100644 (file)
@@ -1,12 +1,12 @@
-.\" Copyright (c) 1990 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1990, 1993, 1994
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\" This code is derived from software contributed to Berkeley by
 .\" the Institute of Electrical and Electronics Engineers, Inc.
 .\"
 .\" %sccs.include.redist.roff%
 .\"
 .\"
 .\" This code is derived from software contributed to Berkeley by
 .\" the Institute of Electrical and Electronics Engineers, Inc.
 .\"
 .\" %sccs.include.redist.roff%
 .\"
-.\"    @(#)rm.1        6.9 (Berkeley) %G%
+.\"    @(#)rm.1        8.3 (Berkeley) %G%
 .\"
 .Dd 
 .Dt RM 1
 .\"
 .Dd 
 .Dt RM 1
@@ -17,7 +17,7 @@
 .Sh SYNOPSIS
 .Nm rm
 .Op Fl f | Fl i
 .Sh SYNOPSIS
 .Nm rm
 .Op Fl f | Fl i
-.Op Fl dRr
+.Op Fl dPRrW
 .Ar file ...
 .Sh DESCRIPTION
 The
 .Ar file ...
 .Sh DESCRIPTION
 The
@@ -51,6 +51,10 @@ The
 option overrides any previous
 .Fl f 
 options.
 option overrides any previous
 .Fl f 
 options.
+.It Fl P
+Overwrite regular files before deleting them.
+Files are overwritten three times, first with the byte pattern 0xff,
+then 0x00, and then 0xff again, before they are deleted.
 .It Fl R
 Attempt to remove the file hierarchy rooted in each file argument.
 The 
 .It Fl R
 Attempt to remove the file hierarchy rooted in each file argument.
 The 
@@ -69,6 +73,8 @@ that directory is skipped.
 .It Fl r
 Equivalent to
 .Fl R .
 .It Fl r
 Equivalent to
 .Fl R .
+.It Fl W
+Removes a whiteout.
 .El
 .Pp
 The
 .El
 .Pp
 The
@@ -90,7 +96,17 @@ exits with a value >0.
 .Sh SEE ALSO
 .Xr rmdir 1 ,
 .Xr unlink 2 ,
 .Sh SEE ALSO
 .Xr rmdir 1 ,
 .Xr unlink 2 ,
-.Xr fts 3
+.Xr unwhiteout 2 ,
+.Xr fts 3 ,
+.Xr symlink 7
+.Sh BUGS
+The
+.Fl P
+option assumes that the underlying file system is a fixed-block file
+system.
+UFS is a fixed-block file system, LFS is not.
+In addition, only regular files are overwritten, other types of files
+are not.
 .Sh COMPATIBILITY
 The
 .Nm rm
 .Sh COMPATIBILITY
 The
 .Nm rm