changes for whiteouts and union filesystem
[unix-history] / usr / src / usr.bin / chflags / chflags.1
index 388fff7..269d101 100644 (file)
@@ -1,12 +1,12 @@
-.\" Copyright (c) 1989, 1990 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1989, 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%
 .\"
-.\"    @(#)chflags.1   5.6 (Berkeley) %G%
+.\"    @(#)chflags.1   8.3 (Berkeley) %G%
 .\"
 .Dd 
 .Dt CHFLAGS 1
 .\"
 .Dd 
 .Dt CHFLAGS 1
 .Nd change file flags
 .Sh SYNOPSIS
 .Nm chflags
 .Nd change file flags
 .Sh SYNOPSIS
 .Nm chflags
-.Op Fl HRh
+.Oo
+.Fl R
+.Op Fl H | Fl L | Fl P
+.Oc
 .Ar flags
 .Ar file ...
 .Sh DESCRIPTION
 .Ar flags
 .Ar file ...
 .Sh DESCRIPTION
@@ -30,22 +33,28 @@ operand.
 The options are as follows:
 .Bl -tag -width Ds
 .It Fl H
 The options are as follows:
 .Bl -tag -width Ds
 .It Fl H
-When encountering a symbolic link on the command line, follow it.  All other
-symbolic links encountered in the traversal are not followed.
+If the
+.Fl R
+option is specified, symbolic links on the command line are followed.
+(Symbolic links encountered in the tree traversal are not followed.)
+.It Fl L
+If the
+.Fl R
+option is specified, all symbolic links are followed.
+.It Fl P
+If the
+.Fl R
+option is specified, no symbolic links are followed.
 .It Fl R
 .It Fl R
-Traverse a file hierarchy.
-For each file that is of type directory,
-.Nm chflags
-changes the flags of all files in the file hierarchy below it followed
-by the flags of the directory itself.
-.It Fl h
-When encountering a symbolic link anywhere in the traversal, follow it.
+Change the file flags for the file hierarchies rooted
+in the files instead of just the files themselves.
 .El
 .Pp
 Flags are a comma separated list of keywords.
 The following keywords are currently defined:
 .Bd -literal -offset indent compact
 .\"arch        nothing yet.
 .El
 .Pp
 Flags are a comma separated list of keywords.
 The following keywords are currently defined:
 .Bd -literal -offset indent compact
 .\"arch        nothing yet.
+opaque set the opaque flag
 dump   set the dump flag
 sappnd set the system append-only flag (super-user only)
 schg   set the system immutable flag (super-user only)
 dump   set the dump flag
 sappnd set the system append-only flag (super-user only)
 schg   set the system immutable flag (super-user only)
@@ -61,13 +70,23 @@ For example:
 nodump the file should never be dumped
 .Ed
 .Pp
 nodump the file should never be dumped
 .Ed
 .Pp
-The flags of a symbolic link are immutable, so that unless the
-.Fl h
-or
+Symbolic links do not have flags, so unless the
 .Fl H
 .Fl H
-flags are set,
+or
+.Fl L
+option is set,
 .Nm chflags
 on a symbolic link always succeeds and has no effect.
 .Nm chflags
 on a symbolic link always succeeds and has no effect.
+The
+.Fl H ,
+.Fl L
+and
+.Fl P
+options are ignored unless the
+.Fl R
+option is specified.
+In addition, these options override each other and the
+command's actions are determined by the last one specified.
 .Pp
 The
 .Nm chflags
 .Pp
 The
 .Nm chflags