From 14a2a9b10bd4f9c56217234afb321cd5e8509d72 Mon Sep 17 00:00:00 2001 From: Warren Toomey Date: Wed, 2 Mar 2016 19:39:41 +1000 Subject: [PATCH] I've updated the top-level Makefile to build all the existing utilities. I've borrowed the V1 manuals from http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/man/man1 and changed them to reflect the PDP-7 utilities. --- Makefile | 4 ++++ man/cat.1 | 28 ++++++++++++++++++++++++++++ man/chmod.1 | 28 ++++++++++++++++++++++++++++ man/chown.1 | 21 +++++++++++++++++++++ man/chrm.1 | 26 ++++++++++++++++++++++++++ man/cp.1 | 23 +++++++++++++++++++++++ 6 files changed, 130 insertions(+) create mode 100644 man/cat.1 create mode 100644 man/chmod.1 create mode 100644 man/chown.1 create mode 100644 man/chrm.1 create mode 100644 man/cp.1 diff --git a/Makefile b/Makefile index 10d39c8..4dd1906 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,10 @@ all: utilities utilities: $(AS) src/cmd/cat.s > bin/cat + $(AS) src/cmd/cp.s > bin/cp + $(AS) src/cmd/chmod.s > bin/chmod + $(AS) src/cmd/chown.s > bin/chown + $(AS) src/cmd/chrm.s > bin/chrm rm -f n.out clean: diff --git a/man/cat.1 b/man/cat.1 new file mode 100644 index 0000000..6a7ea63 --- /dev/null +++ b/man/cat.1 @@ -0,0 +1,28 @@ + 11/3/70 CAT (I) + + +NAME cat -- concatenate and print + +SYNOPSIS cat file1 ... + +DESCRIPTION cat reads each file in sequence and writes it on the + standard output stream. Thus: + + cat file + + is about the easiest way to print a file. Also: + + cat filel file2 >file3 + + is about the easiest way to concatenate files. + +FILES + +SEE ALSO pr, cp + +DIAGNOSTICS If a file cannot be found it is ignored. If no files are + given, "no files" is output. + +BUGS + +OWNER ken, dmr diff --git a/man/chmod.1 b/man/chmod.1 new file mode 100644 index 0000000..6333b89 --- /dev/null +++ b/man/chmod.1 @@ -0,0 +1,28 @@ + 11/3/70 CHMOD (I) + + +NAME chmod -- change mode + +SYNOPSIS chmod octal file1 file2 file3 ... + +DESCRIPTION The octal mode replaces the mode of each of the files. The + mode is constructed from the OR of the following modes: + + 01 write for non--owner + 02 read for non--owner + 04 write for owner + 10 read for owner + 20 executable + 40 set--UID + + Only the owner of a file may change its mode. + +FILES + +SEE ALSO stat, ls + +DIAGNOSTICS + +BUGS + +OWNER ken, dmr diff --git a/man/chown.1 b/man/chown.1 new file mode 100644 index 0000000..4eaade7 --- /dev/null +++ b/man/chown.1 @@ -0,0 +1,21 @@ +11/3/70 CHOWN (I) + + +NAME chown -- change owner + +SYNOPSIS chown owner file + +DESCRIPTION owner becomes the new owner of the files. The owner is an + octal UID. + + Only the owner of a file is allowed to change the owner. + +FILES + +SEE ALSO stat + +DIAGNOSTICS + +BUGS + +OWNER ken, dmr diff --git a/man/chrm.1 b/man/chrm.1 new file mode 100644 index 0000000..0709a90 --- /dev/null +++ b/man/chrm.1 @@ -0,0 +1,26 @@ + 11/3/70 CHRM (I) + + +NAME chrm -- remove (unlink) files + +SYNOPSIS chrm directory name1 ... + +DESCRIPTION chrm removes the entries for one or more files from the + named directory. If an entry was the last link to the file, + the file is destroyed. Removal of a file requires write + permission in its directory, but neither read nor write + permission on the file itself. + + Directories cannot be removed by rm; cf. rmdir. + +FILES none. + +SEE ALSO rmdir, for removing directories. + +DIAGNOSTICS If the file cannot be removed or does not exist, the name + of the file followed by a question mark is typed. + +BUGS rm probably should ask whether a read-only file is really + to be removed. + +OWNER ken, dmr diff --git a/man/cp.1 b/man/cp.1 new file mode 100644 index 0000000..c97bca8 --- /dev/null +++ b/man/cp.1 @@ -0,0 +1,23 @@ +11/3/70 CP (I) + + +NAME cp -- copy + +SYNOPSIS cp file11 file12 file21 file22 ... + +DESCRIPTION Files are taken in pairs; the first is opened for reading, + the second created mode 17. Then the first is copied into + the second. + +FILES + +SEE ALSO cat, pr + +DIAGNOSTICS Error returns are checked at every system call, and + appropriate diagnostics are produced. + +BUGS The second file should be created in the mode of the first. + + A directory convention as used in mv should be adopted to cp. + +OWNER ken, dmr