POSIX 1003.2B/D9 symbolic links
[unix-history] / usr / src / usr.bin / chflags / chflags.1
index 6eba4f3..7375133 100644 (file)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1989, 1990, 1993
+.\" 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 Regents of the University of California.  All rights reserved.
 .\"
 .\" This code is derived from software contributed to Berkeley by
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.roff%
 .\"
 .\"
 .\" %sccs.include.redist.roff%
 .\"
-.\"    @(#)chflags.1   8.1 (Berkeley) %G%
+.\"    @(#)chflags.1   8.2 (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,16 +33,21 @@ 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.
 .El
 .Pp
 Flags are a comma separated list of keywords.
@@ -61,13 +69,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 unless the
-.Fl h
-or
+Symbolic links do not have flags, so unless the
 .Fl H
 .Fl H
-flag is 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