diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-12-31 23:38:17 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-12-31 23:38:17 +0000 |
commit | 80f972faa93ef900747a1135cda3199eeebb8072 (patch) | |
tree | ad637adb6508ed5b2f925e4b00fde669dbb287da /bin/chmod | |
parent | d96eca3fba6c111da9303d022e3ef8f72f22c3ff (diff) |
Document the -h option for chmod and chflags, rewording the chgrp(1) and
chown(8) manpages to be consistent and clearer about it as well.
Diffstat (limited to 'bin/chmod')
-rw-r--r-- | bin/chmod/chflags.1 | 13 | ||||
-rw-r--r-- | bin/chmod/chgrp.1 | 7 | ||||
-rw-r--r-- | bin/chmod/chmod.1 | 13 | ||||
-rw-r--r-- | bin/chmod/chmod.c | 14 | ||||
-rw-r--r-- | bin/chmod/chown.8 | 11 |
5 files changed, 37 insertions, 21 deletions
diff --git a/bin/chmod/chflags.1 b/bin/chmod/chflags.1 index 94b17546f4c..a1460783da0 100644 --- a/bin/chmod/chflags.1 +++ b/bin/chmod/chflags.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chflags.1,v 1.15 2014/12/13 20:59:24 guenther Exp $ +.\" $OpenBSD: chflags.1,v 1.16 2015/12/31 23:38:16 guenther Exp $ .\" $NetBSD: chflags.1,v 1.4 1995/08/31 22:50:22 jtc Exp $ .\" .\" Copyright (c) 1989, 1990, 1993, 1994 @@ -33,7 +33,7 @@ .\" .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 .\" -.Dd $Mdocdate: December 13 2014 $ +.Dd $Mdocdate: December 31 2015 $ .Dt CHFLAGS 1 .Os .Sh NAME @@ -41,6 +41,7 @@ .Nd change file flags .Sh SYNOPSIS .Nm chflags +.Op Fl h .Oo .Fl R .Op Fl H | L | P @@ -72,6 +73,14 @@ If the .Fl R option is also specified, symbolic links on the command line are followed. Symbolic links encountered in the tree traversal are not followed. +.It Fl h +Treat symbolic links like other files: modify links instead of +following them. +The +.Fl h +and +.Fl R +options are mutually exclusive. .It Fl L If the .Fl R diff --git a/bin/chmod/chgrp.1 b/bin/chmod/chgrp.1 index b31776304fc..2b0a5ecd0c8 100644 --- a/bin/chmod/chgrp.1 +++ b/bin/chmod/chgrp.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chgrp.1,v 1.16 2014/01/21 22:35:44 jmc Exp $ +.\" $OpenBSD: chgrp.1,v 1.17 2015/12/31 23:38:16 guenther Exp $ .\" .\" Copyright (c) 1983, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" from: @(#)chgrp.1 8.3 (Berkeley) 3/31/94 .\" -.Dd $Mdocdate: January 21 2014 $ +.Dd $Mdocdate: December 31 2015 $ .Dt CHGRP 1 .Os .Sh NAME @@ -59,7 +59,8 @@ If the option is specified, symbolic links on the command line are followed. Symbolic links encountered in the tree traversal are not followed. .It Fl h -Change the group ID of the specified symbolic link. +Treat symbolic links like other files: modify links instead of +following them. The .Fl h and diff --git a/bin/chmod/chmod.1 b/bin/chmod/chmod.1 index b41d5641ae2..3f979fa5c14 100644 --- a/bin/chmod/chmod.1 +++ b/bin/chmod/chmod.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chmod.1,v 1.40 2015/03/13 19:58:40 jmc Exp $ +.\" $OpenBSD: chmod.1,v 1.41 2015/12/31 23:38:16 guenther Exp $ .\" $NetBSD: chmod.1,v 1.8 1995/03/21 09:02:07 cgd Exp $ .\" .\" Copyright (c) 1989, 1990, 1993, 1994 @@ -33,7 +33,7 @@ .\" .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" -.Dd $Mdocdate: March 13 2015 $ +.Dd $Mdocdate: December 31 2015 $ .Dt CHMOD 1 .Os .Sh NAME @@ -41,6 +41,7 @@ .Nd change file modes .Sh SYNOPSIS .Nm chmod +.Op Fl h .Oo .Fl R .Op Fl H | L | P @@ -63,6 +64,14 @@ If the .Fl R option is also specified, symbolic links on the command line are followed. Symbolic links encountered in the tree traversal are not followed. +.It Fl h +Treat symbolic links like other files: modify links instead of +following them. +The +.Fl h +and +.Fl R +options are mutually exclusive. .It Fl L If the .Fl R diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 16caf36f050..8d8e03275ee 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chmod.c,v 1.38 2015/10/09 01:37:06 deraadt Exp $ */ +/* $OpenBSD: chmod.c,v 1.39 2015/12/31 23:38:16 guenther Exp $ */ /* $NetBSD: chmod.c,v 1.12 1995/03/21 09:02:09 cgd Exp $ */ /* @@ -344,14 +344,10 @@ a_gid(const char *s) void usage(void) { - if (ischmod || ischflags) - fprintf(stderr, - "usage: %s [-R [-H | -L | -P]] %s file ...\n", - __progname, ischmod ? "mode" : "flags"); - else - fprintf(stderr, - "usage: %s [-h] [-R [-H | -L | -P]] %s file ...\n", - __progname, ischown ? "owner[:group]" : "group"); + fprintf(stderr, + "usage: %s [-h] [-R [-H | -L | -P]] %s file ...\n", + __progname, ischmod ? "mode" : ischflags ? "flags" : + ischown ? "owner[:group]" : "group"); if (ischown) fprintf(stderr, " %s [-h] [-R [-H | -L | -P]] :group file ...\n", diff --git a/bin/chmod/chown.8 b/bin/chmod/chown.8 index cebd52784ba..f4339778698 100644 --- a/bin/chmod/chown.8 +++ b/bin/chmod/chown.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chown.8,v 1.19 2015/09/14 20:06:58 schwarze Exp $ +.\" $OpenBSD: chown.8,v 1.20 2015/12/31 23:38:16 guenther Exp $ .\" .\" Copyright (c) 1990, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)chown.8 8.3 (Berkeley) 3/31/94 .\" -.Dd $Mdocdate: September 14 2015 $ +.Dd $Mdocdate: December 31 2015 $ .Dt CHOWN 8 .Os .Sh NAME @@ -64,11 +64,12 @@ If the option is specified, symbolic links on the command line are followed. Symbolic links encountered in the tree traversal are not followed. .It Fl h -Change the user ID and/or the group ID on symbolic links. +Treat symbolic links like other files: modify links instead of +following them. The -.Fl R -and .Fl h +and +.Fl R options are mutually exclusive. .It Fl L If the |