From c1db0f95563d1fac151d7c965d06b79a4b4e5da8 Mon Sep 17 00:00:00 2001 From: Ken Thompson Date: Wed, 10 Jan 1979 15:15:21 -0500 Subject: [PATCH] Research V7 development Work on file usr/man/man1/cb.1 Work on file usr/man/man1/chmod.1 Work on file usr/man/man1/chown.1 Work on file usr/man/man1/clri.1m Co-Authored-By: Dennis Ritchie Synthesized-from: v7 --- usr/man/man1/cb.1 | 11 +++ usr/man/man1/chmod.1 | 172 +++++++++++++++++++++++++++++++++++++++++++ usr/man/man1/chown.1 | 35 +++++++++ usr/man/man1/clri.1m | 44 +++++++++++ 4 files changed, 262 insertions(+) create mode 100644 usr/man/man1/cb.1 create mode 100644 usr/man/man1/chmod.1 create mode 100644 usr/man/man1/chown.1 create mode 100644 usr/man/man1/clri.1m diff --git a/usr/man/man1/cb.1 b/usr/man/man1/cb.1 new file mode 100644 index 0000000000..cf68591775 --- /dev/null +++ b/usr/man/man1/cb.1 @@ -0,0 +1,11 @@ +.TH CB 1 +.SH NAME +cb \- C program beautifier +.SH SYNOPSIS +.B cb +.SH DESCRIPTION +.I Cb +places a copy of the C program from the standard input +on the standard output with spacing and indentation +that displays the structure of the program. +.SH BUGS diff --git a/usr/man/man1/chmod.1 b/usr/man/man1/chmod.1 new file mode 100644 index 0000000000..dc61d36609 --- /dev/null +++ b/usr/man/man1/chmod.1 @@ -0,0 +1,172 @@ +.TH CHMOD 1 +.SH NAME +chmod \- change mode +.SH SYNOPSIS +.B chmod +mode file ... +.SH DESCRIPTION +The mode of +each named file +is changed +according to +.I mode, +which may be absolute or symbolic. +An absolute +.I mode +is an octal +number constructed +from the OR of the +following modes: +.TP 10 +4000 +set user ID on execution +.br +.br +.ns +.TP 10 +2000 +set group ID on execution +.br +.br +.ns +.TP 10 +1000 +sticky bit, see +.IR chmod (2) +.br +.br +.ns +.TP 10 +0400 +read by owner +.br +.br +.ns +.TP 10 +0200 +write by owner +.br +.br +.ns +.TP 10 +0100 +execute (search in directory) by owner +.br +.br +.ns +.TP 10 +0070 +read, write, execute (search) by group +.br +.br +.ns +.TP 10 +0007 +read, write, execute (search) by others +.PP +A symbolic +.I mode +has the form: +.IP +.RI [ who ] +.I op permission +.RI [ "op permission" "] ..." +.PP +The +.I who +part is a combination +of the letters +.B u +(for user's permissions), +.B g +(group) +and +.B o +(other). +The letter +.B a +stands for +.B ugo. +If +.I who +is omitted, +the default is +.I a +but the setting of +the file creation mask +(see umask(2)) +is taken into account. +.PP +.I Op +can be +.B + +to add +.I permission +to the file's mode, +.B \- +to take away +.I permission +and +.B = +to assign +.I permission +absolutely +(all other bits will +be reset). +.PP +.I Permission +is any combination of the letters +.B r +(read), +.B w +(write), +.B x +(execute), +.B s +(set owner or group id) +and +.B t +(save text \- sticky). +Letters +.BR u, +.B g +or +.B o +indicate that +.I permission +is to be taken +from the current +mode. +Omitting +.I permission +is only useful +with +.B = +to take away +all permissions. +.PP +The first example denies write permission to others, +the second makes a file executable: +.IP +chmod o\-w file +.br +chmod +x file +.PP +Multiple symbolic modes separated by commas may be given. +Operations are performed +in the order specified. +The letter +.B s +is only useful +with +.B u +or +.B g. +.PP +Only the owner of a file (or the super-user) may change its mode. +.SH "SEE ALSO" +ls(1), +chmod(2), +chown (1), +stat(2), +umask(2) diff --git a/usr/man/man1/chown.1 b/usr/man/man1/chown.1 new file mode 100644 index 0000000000..7be9fe5880 --- /dev/null +++ b/usr/man/man1/chown.1 @@ -0,0 +1,35 @@ +.TH CHOWN 1 +.SH NAME +chown, chgrp \- change owner or group +.SH SYNOPSIS +.B chown +owner file ... +.PP +.B chgrp +group file ... +.SH DESCRIPTION +.I Chown +changes the owner of the +.I files +to +.IR owner . +The owner may be either a decimal UID or +a login name found in the password file. +.PP +.I Chgrp +changes the group-ID of the +.I files +to +.IR group . +The group may be either a decimal GID or +a group name found in the group-ID file. +.PP +Only the super-user can change owner or group, +in order to simplify as yet unimplemented accounting procedures. +.SH FILES +/etc/passwd +.br +/etc/group +.SH "SEE ALSO" +chown(2), +passwd(5), group(5) diff --git a/usr/man/man1/clri.1m b/usr/man/man1/clri.1m new file mode 100644 index 0000000000..5754b92631 --- /dev/null +++ b/usr/man/man1/clri.1m @@ -0,0 +1,44 @@ +.TH CLRI 1M +.SH NAME +clri \- clear i-node +.SH SYNOPSIS +.B clri +filesystem i-number ... +.SH DESCRIPTION +.I Clri +writes zeros on the i-nodes +with the decimal +.I i-numbers +on the +.I filesystem. +After +.I clri, +any blocks +in the affected file +will show up as `missing' in an +.IR icheck (1) +of the +.I filesystem. +.PP +Read and write permission is required on the specified +file system device. +The i-node becomes allocatable. +.PP +The primary purpose of this routine +is to remove a file which +for some reason appears in no +directory. +If it is used to zap an i-node +which does appear in a directory, care should be taken to track down +the entry and remove it. +Otherwise, when the i-node is reallocated to some new file, +the old entry will still point to that file. +At that point removing the old entry will destroy the new file. +The new entry will again point to an unallocated i-node, +so the whole cycle is likely to be repeated again and again. +.SH "SEE ALSO" +icheck(1) +.SH BUGS +If the file is open, +.I clri +is likely to be ineffective. -- 2.20.1