diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2005-10-15 08:50:45 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2005-10-15 08:50:45 +0000 |
commit | 51c25f99fe8da2733402db14ffb3dfeb5b5233d8 (patch) | |
tree | f7287d2fa7f6eea9c3559ffb107cf5b11528940e /bin/chmod | |
parent | 666fc07ee5bcbac6fceb83dee6b449c76209fd50 (diff) |
standardise EXAMPLES;
Diffstat (limited to 'bin/chmod')
-rw-r--r-- | bin/chmod/chmod.1 | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/bin/chmod/chmod.1 b/bin/chmod/chmod.1 index 7fa40d4f1dc..4b8d7062bf1 100644 --- a/bin/chmod/chmod.1 +++ b/bin/chmod/chmod.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chmod.1,v 1.28 2005/10/15 08:40:07 jmc Exp $ +.\" $OpenBSD: chmod.1,v 1.29 2005/10/15 08:50:44 jmc Exp $ .\" $NetBSD: chmod.1,v 1.8 1995/03/21 09:02:07 cgd Exp $ .\" .\" Copyright (c) 1989, 1990, 1993, 1994 @@ -323,40 +323,39 @@ or .Sq t , are ignored. .Sh EXAMPLES -.Li $ chmod 644 file +Set file readable by anyone and writable by the owner only: .Pp -Set file readable by anyone and writable by the owner only. +.Dl $ chmod 644 file .Pp -.Li $ chmod go-w file +Deny write permission to group and others: .Pp -Deny write permission to group and others. -.Pp -.Li $ chmod =rw,+X file +.Dl $ chmod go-w file .Pp Set the read and write permissions to the usual defaults, but -retain any execute permissions that are currently set. +retain any execute permissions that are currently set: .Pp -.Li $ chmod +X file +.Dl $ chmod =rw,+X file .Pp Make a directory or file searchable/executable by everyone if it is -already searchable/executable by anyone. +already searchable/executable by anyone: .Pp -.Li $ chmod 755 file -.br -.Li $ chmod u=rwx,go=rx file -.br -.Li $ chmod u=rwx,go=u-w file +.Dl $ chmod +X file .Pp Any of these commands will make a file readable/executable by everyone and -writable by the owner only. +writable by the owner only: +.Bd -literal -offset indent +$ chmod 755 file +$ chmod u=rwx,go=rx file +$ chmod u=rwx,go=u-w file +.Ed .Pp -.Li $ chmod go= file +Clear all mode bits for group and others: .Pp -Clear all mode bits for group and others. +.Dl $ chmod go= file .Pp -.Li $ chmod g=u-w file +Set the group bits equal to the user bits, but clear the group write bit: .Pp -Set the group bits equal to the user bits, but clear the group write bit. +.Dl $ chmod g=u-w file .Sh SEE ALSO .Xr chflags 1 , .Xr chgrp 1 , |