summaryrefslogtreecommitdiffstats
path: root/usr.sbin/chown
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-09-04 11:55:45 +0000
committercharnier <charnier@FreeBSD.org>1997-09-04 11:55:45 +0000
commitd3d26f623e06be399c175d03b0c8f7493690bfc7 (patch)
tree74db6df627cdfd9048b1a74ac83874975167084b /usr.sbin/chown
parent6047dd4c945dc2b42e4b7af4ba88dab4b1c9bfc3 (diff)
downloadFreeBSD-src-d3d26f623e06be399c175d03b0c8f7493690bfc7.zip
FreeBSD-src-d3d26f623e06be399c175d03b0c8f7493690bfc7.tar.gz
Cosmetic in man page. Sync usage() with man page.
Diffstat (limited to 'usr.sbin/chown')
-rw-r--r--usr.sbin/chown/chgrp.116
-rw-r--r--usr.sbin/chown/chown.816
-rw-r--r--usr.sbin/chown/chown.c12
3 files changed, 25 insertions, 19 deletions
diff --git a/usr.sbin/chown/chgrp.1 b/usr.sbin/chown/chgrp.1
index 9abff11..67122c4 100644
--- a/usr.sbin/chown/chgrp.1
+++ b/usr.sbin/chown/chgrp.1
@@ -51,7 +51,9 @@
.Ar group
.Ar files ...
.Sh DESCRIPTION
-The chgrp utility sets the group ID of the file named by each
+The
+.Nm
+utility sets the group ID of the file named by each
.Ar file
operand to the
.Ar group
@@ -63,7 +65,7 @@ Options:
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.)
+(Symbolic links encountered in the tree traversal are not followed).
.It Fl L
If the
.Fl R
@@ -102,12 +104,12 @@ If a group name is also a numeric group ID, the operand is used as a
group name.
.Pp
The user invoking
-.Nm chgrp
+.Nm
must belong to the specified group and be the owner of the file,
or be the super-user.
.Pp
The
-.Nm chgrp
+.Nm
utility exits 0 on success, and >0 if an error occurs.
.Sh COMPATIBILITY
In previous versions of this system, symbolic links did not have groups.
@@ -125,5 +127,7 @@ Group ID file
.Xr chown 8
.Sh STANDARDS
The
-.Nm chgrp
-utility is expected to be POSIX 1003.2 compatible.
+.Nm
+utility is expected to be
+.St -p1003.2
+compatible.
diff --git a/usr.sbin/chown/chown.8 b/usr.sbin/chown/chown.8
index 7546a4e..38372c2 100644
--- a/usr.sbin/chown/chown.8
+++ b/usr.sbin/chown/chown.8
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)chown.8 8.3 (Berkeley) 3/31/94
-.\" $Id: chown.8,v 1.4 1997/02/22 16:04:35 peter Exp $
+.\" $Id: chown.8,v 1.5 1997/03/31 13:03:47 peter Exp $
.\"
.Dd March 31, 1994
.Dt CHOWN 8
@@ -56,7 +56,7 @@
.Op Fl f
.Op Fl h
.Ar :group
-.Ar file ...
+.Ar
.Sh DESCRIPTION
.Nm Chown
sets the user ID and/or the group ID of the specified files.
@@ -67,7 +67,7 @@ The options are as follows:
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.)
+(Symbolic links encountered in the tree traversal are not followed).
.It Fl L
If the
.Fl R
@@ -122,11 +122,11 @@ The ownership of a file may only be altered by a super-user for
obvious security reasons.
.Pp
The
-.Nm chown
+.Nm
utility exits 0 on success, and >0 if an error occurs.
.Sh COMPATIBILITY
Previous versions of the
-.Nm chown
+.Nm
utility used the dot (``.'') character to distinguish the group name.
This has been changed to be a colon (``:'') character so that user and
group names may contain the dot character.
@@ -141,8 +141,10 @@ owners.
.Xr symlink 7
.Sh STANDARDS
The
-.Nm chown
-command is expected to be POSIX 1003.2 compliant.
+.Nm
+command is expected to be
+.St -p1003.2
+compliant.
.Sh HISTORY
A
.Nm
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c
index c7b171b..b3b7876 100644
--- a/usr.sbin/chown/chown.c
+++ b/usr.sbin/chown/chown.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94";
#else
static const char rcsid[] =
- "$Id$";
+ "$Id: chown.c,v 1.7 1997/08/24 02:10:29 steve Exp $";
#endif
#endif /* not lint */
@@ -122,8 +122,7 @@ main(argc, argv)
fts_options = FTS_PHYSICAL;
if (Rflag) {
if (hflag)
- errx(1,
- "the -R and -h options may not be specified together.");
+ errx(1, "the -R and -h options may not be specified together");
if (Hflag)
fts_options |= FTS_COMFOLLOW;
if (Lflag) {
@@ -266,8 +265,9 @@ chownerr(file)
void
usage()
{
- (void)fprintf(stderr,
- "usage: %s [-R [-H | -L | -P]] [-f] [-h] %s file ...\n",
- myname, ischown ? "[owner][:group]" : "group");
+ (void)fprintf(stderr, "%s\n%s\n%s\n",
+ "usage: chown [-R [-H | -L | -P]] [-f] [-h] owner[:group] file ...",
+ " chown [-R [-H | -L | -P]] [-f] [-h] :group file ...",
+ " chgrp [-R [-H | -L | -P]] [-f] [-h] group file ...");
exit(1);
}
OpenPOWER on IntegriCloud