Research V6 development
authorKen Thompson <ken@research.uucp>
Fri, 27 Jun 1975 00:35:42 +0000 (19:35 -0500)
committerKen Thompson <ken@research.uucp>
Fri, 27 Jun 1975 00:35:42 +0000 (19:35 -0500)
Work on file usr/doc/man/man1/chmod.1
Work on file usr/doc/man/man1/exit.1
Work on file usr/doc/man/man1/ln.1
Work on file usr/doc/man/man1/if.1

Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
Synthesized-from: v6

usr/doc/man/man1/chmod.1 [new file with mode: 0644]
usr/doc/man/man1/exit.1 [new file with mode: 0644]
usr/doc/man/man1/if.1 [new file with mode: 0644]
usr/doc/man/man1/ln.1 [new file with mode: 0644]

diff --git a/usr/doc/man/man1/chmod.1 b/usr/doc/man/man1/chmod.1
new file mode 100644 (file)
index 0000000..29fa2f5
--- /dev/null
@@ -0,0 +1,51 @@
+.th CHMOD I 2/8/75
+.sh NAME
+chmod \*- change mode
+.sh SYNOPSIS
+.bd chmod
+octal file ...
+.sh DESCRIPTION
+The octal mode
+replaces the mode of each of the files.
+The mode is constructed from the OR of the
+following modes:
+.s3
+.lp +10 7
+4000   set user ID on execution
+.lp +10 7
+2000   set group ID on execution
+.lp +10 7
+1000   sticky bit for shared, pure-procedure programs (see below)
+.lp +10 7
+0400   read by owner
+.lp +10 7
+0200   write by owner
+.lp +10 7
+0100   execute (search in directory) by owner
+.lp +10 7
+0070   read, write, execute (search) by group
+.lp +10 7
+0007   read, write, execute (search) by others
+.s3
+.i0
+Only the owner of a file (or the super-user) may change its mode.
+.s3
+If an executable file is set up for sharing (``\*-n'' option
+of
+.it "ld (I)"
+), then mode 1000 prevents the system from
+abandoning the swap-space image of the program-text portion
+of the file when its last user
+terminates.
+Thus when the next user of the file executes it,
+the text need not be read from the file
+system but can simply be swapped in,
+saving time.
+Ability to set this bit is restricted to the super-user
+since swap space is consumed
+by the images; it is only worth while for heavily used commands.
+.s3
+.sh "SEE ALSO"
+ls (I),
+chmod (II)
+.sh BUGS
diff --git a/usr/doc/man/man1/exit.1 b/usr/doc/man/man1/exit.1
new file mode 100644 (file)
index 0000000..9fec1d4
--- /dev/null
@@ -0,0 +1,18 @@
+.th EXIT I 3/15/72
+.sh NAME
+exit  \*-  terminate command file
+.sh SYNOPSIS
+.bd exit
+.sh DESCRIPTION
+.it Exit
+performs a
+.bd seek
+to the end of its standard input file.
+Thus, if it is invoked inside
+a file of commands, upon return from
+.it exit
+the shell will
+discover an end-of-file and terminate.
+.sh "SEE ALSO"
+if (I), goto (I), sh (I)
+.sh BUGS
diff --git a/usr/doc/man/man1/if.1 b/usr/doc/man/man1/if.1
new file mode 100644 (file)
index 0000000..58069cd
--- /dev/null
@@ -0,0 +1,86 @@
+.th IF I 5/2/74
+.sh NAME
+if \*-  conditional command
+.sh SYNOPSIS
+.bd if
+expr command [ arg ... ]
+.sh DESCRIPTION
+.it If
+evaluates the expression
+.it expr,
+and if its value is
+true,
+executes the given
+.it command
+with the given arguments.
+.s3
+The following primitives are used to construct
+the
+.it expr:
+.s3
+.lp +13 13
+\fB\*-r\fR file        true if the file exists and is readable.
+.s3
+.lp +13 13
+\fB\*-w \fRfile        true if the file exists and is writable.
+.s3
+.lp +13 13
+s1 \fB= \fRs2  true
+if the strings
+.it s1
+and
+.it s2
+are equal.
+.s3
+.lp +13 13
+s1 \fB!= \fRs2 true
+if the strings
+.it s1
+and
+.it s2
+are not equal.
+.s3
+.lp +13 13
+\fB{ \fRcommand \fB}\fR        The bracketed command is
+executed to obtain the
+exit status.
+Status zero is considered
+.it true.
+The command must
+not
+be another
+.it if.
+.s3
+.i0
+These primaries may be combined with the
+following operators:
+.s3
+.lp +13 13
+\fB!\fR        unary negation operator
+.s3
+.lp +13 13
+\fB\*-a\fR     binary
+.it and
+operator
+.s3
+.lp +13 13
+\fB\*-o\fR     binary
+.it or
+operator
+.s3
+.lp +13 13
+\fB( \fRexpr\fB )\fR   parentheses for grouping.
+.s3
+.i0
+.bd \*-a
+has higher precedence than
+.bd \*-o.
+Notice that all the operators and flags are separate
+arguments to
+.it if
+and hence must be surrounded by spaces.
+Notice also that parentheses are meaningful
+to the Shell and must be escaped.
+.sh "SEE ALSO"
+sh (I), find (I)
+.sh BUGS
diff --git a/usr/doc/man/man1/ln.1 b/usr/doc/man/man1/ln.1
new file mode 100644 (file)
index 0000000..70c98dc
--- /dev/null
@@ -0,0 +1,44 @@
+.th LN I 3/15/72
+.sh NAME
+ln  \*-  make a link
+.sh SYNOPSIS
+.bd ln
+name1 [ name2 ]
+.sh DESCRIPTION
+A link is a directory entry referring
+to a file; the same file (together with
+its size, all its protection
+information, etc)
+may have several links to it.
+There is no way to distinguish a link to a file
+from its original directory entry;
+any changes in the
+file are effective
+independently of the name by which the file is known.
+.s3
+.it Ln
+creates a link to an existing file
+.it name1.
+If
+.it name2
+is given, the link has that name;
+otherwise it is placed in the current directory
+and its name is the last component
+of
+.it name1.
+.s3
+It is forbidden to link to a directory
+or to link across file systems.
+.sh "SEE ALSO"
+rm (I)
+.sh BUGS
+There is nothing particularly
+wrong with
+.it ln,
+but
+.it tp
+doesn't understand about links and makes one copy for
+each name by which a file is known;
+thus if the tape is extracted
+several copies are restored and the information that links were involved
+is lost.