[BACK]Return to chflags.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / chflags

Annotation of src/usr.bin/chflags/chflags.1, Revision 1.8

1.8     ! aaron       1: .\"    $OpenBSD: chflags.1,v 1.7 1999/10/05 19:56:27 aaron Exp $
1.1       deraadt     2: .\"    $NetBSD: chflags.1,v 1.4 1995/08/31 22:50:22 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1989, 1990, 1993, 1994
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" This code is derived from software contributed to Berkeley by
                      8: .\" the Institute of Electrical and Electronics Engineers, Inc.
                      9: .\"
                     10: .\" Redistribution and use in source and binary forms, with or without
                     11: .\" modification, are permitted provided that the following conditions
                     12: .\" are met:
                     13: .\" 1. Redistributions of source code must retain the above copyright
                     14: .\"    notice, this list of conditions and the following disclaimer.
                     15: .\" 2. Redistributions in binary form must reproduce the above copyright
                     16: .\"    notice, this list of conditions and the following disclaimer in the
                     17: .\"    documentation and/or other materials provided with the distribution.
                     18: .\" 3. All advertising materials mentioning features or use of this software
                     19: .\"    must display the following acknowledgement:
                     20: .\"    This product includes software developed by the University of
                     21: .\"    California, Berkeley and its contributors.
                     22: .\" 4. Neither the name of the University nor the names of its contributors
                     23: .\"    may be used to endorse or promote products derived from this software
                     24: .\"    without specific prior written permission.
                     25: .\"
                     26: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     27: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     28: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     29: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     30: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     31: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     32: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     33: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     34: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     35: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     36: .\" SUCH DAMAGE.
                     37: .\"
                     38: .\"    @(#)chflags.1   8.4 (Berkeley) 5/2/95
                     39: .\"
                     40: .Dd May 2, 1995
                     41: .Dt CHFLAGS 1
                     42: .Os
                     43: .Sh NAME
                     44: .Nm chflags
                     45: .Nd change file flags
                     46: .Sh SYNOPSIS
                     47: .Nm chflags
                     48: .Oo
                     49: .Fl R
                     50: .Op Fl H | Fl L | Fl P
                     51: .Oc
                     52: .Ar flags
1.4       aaron      53: .Ar file Op Ar ...
1.1       deraadt    54: .Sh DESCRIPTION
                     55: The
1.5       aaron      56: .Nm
1.1       deraadt    57: utility modifies the file flags of the listed files
                     58: as specified by the
                     59: .Ar flags
                     60: operand.
1.7       aaron      61: The
                     62: .Ar flags
                     63: of a file dictate special restrictions beyond those enforced by its
                     64: mode/permissions.
1.1       deraadt    65: .Pp
                     66: The options are as follows:
                     67: .Bl -tag -width Ds
1.7       aaron      68: .It Fl R
                     69: Recursively descend through any specified directory arguments.
                     70: Change the flags of the file hierarchies rooted
                     71: in the files instead of just the files themselves.
1.1       deraadt    72: .It Fl H
                     73: If the
                     74: .Fl R
1.7       aaron      75: option is also specified, symbolic links on the command line are followed.
1.1       deraadt    76: (Symbolic links encountered in the tree traversal are not followed.)
                     77: .It Fl L
                     78: If the
                     79: .Fl R
1.7       aaron      80: option is also specified, all symbolic links are followed.
1.1       deraadt    81: .It Fl P
                     82: If the
                     83: .Fl R
1.7       aaron      84: option is also specified, no symbolic links are followed.
1.1       deraadt    85: .El
                     86: .Pp
                     87: Flags are a comma separated list of keywords.
                     88: The following keywords are currently defined:
                     89: .Bd -literal -offset indent compact
                     90: arch   set the archived flag
                     91: opaque set the opaque flag (owner or super-user only)
                     92: nodump set the nodump flag (owner or super-user only)
                     93: sappnd set the system append-only flag (super-user only)
                     94: schg   set the system immutable flag (super-user only)
                     95: uappnd set the user append-only flag (owner or super-user only)
                     96: uchg   set the user immutable flag (owner or super-user only)
                     97: .Ed
                     98: .Pp
                     99: Putting the letters
                    100: .Dq no
                    101: before an option causes the flag to be turned off.
                    102: For example:
                    103: .Bd -literal -offset indent compact
                    104: nouchg the immutable bit should be cleared
                    105: .Ed
1.8     ! aaron     106: .Pp
        !           107: The
        !           108: .Dq sappnd
        !           109: and
        !           110: .Dq schg
        !           111: system flags may be set at any time, but normally may only be unset when the
        !           112: system is in single-user mode (see
        !           113: .Xr init 8
        !           114: for details).
1.1       deraadt   115: .Pp
                    116: Symbolic links do not have flags, so unless the
                    117: .Fl H
                    118: or
                    119: .Fl L
                    120: option is set,
1.5       aaron     121: .Nm
1.1       deraadt   122: on a symbolic link always succeeds and has no effect.
                    123: The
                    124: .Fl H ,
                    125: .Fl L
                    126: and
                    127: .Fl P
                    128: options are ignored unless the
                    129: .Fl R
                    130: option is specified.
                    131: In addition, these options override each other and the
                    132: command's actions are determined by the last one specified.
1.6       deraadt   133: .Pp
                    134: Only the super-user can change the user flags on block and
                    135: character devices.
1.1       deraadt   136: .Pp
1.3       deraadt   137: You can use "ls -lo" to see the flags of existing files.
                    138: .Pp
1.1       deraadt   139: The
1.5       aaron     140: .Nm
1.4       aaron     141: utility exits 0 on success or >0 if an error occurred.
1.1       deraadt   142: .Sh SEE ALSO
1.3       deraadt   143: .Xr ls 1 ,
1.1       deraadt   144: .Xr chflags 2 ,
                    145: .Xr stat 2 ,
                    146: .Xr fts 3 ,
                    147: .Xr symlink 7