Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50334/tops04.gno
There are no other files named tops04.gno in the archive.
%switch qz false
%if qz
%nocontrolc
%nextlesson pub("TOPQ");
%ifend qz
%language english
%text
%if qz
TOPQ04 - Files.
%ifnot qz
TOPS04 - Files.
%ifend qz
==============

When you  have  logged  in,  the  disk  memory  of  the  computer  is
availableto you.  Here you can store data, source programs, compiled,
executable programs or any other kind of information which  you  want
to  process.  The  disk  is  divided  into FILES and every FILE has a
FILENAME, an EXTENSION  and  a  PROTECTION  CODE.  Files  are  stored
individually  for  each project-programmer number, so that your files
won't get mixed up with other people's files. 
%text whatisafile:
The FILENAME is from one to six letters or digits.

The  EXTENSION is from one to three letters or digits, which indicate
what kind of file you have got.

The PROTECTION is three octal digits which indicate who is  permitted
to  do  what  to  the  file. The combination of FILENAME and
extension must be unique within the project-programmer number
of the owner of the file.
%text
A typical file specification may look like this: PROG.ALG <057>.

PROG is the FILENAME, ALG is the EXTENSION, indicating that this file
contains  an ALGOL source program, <057> is the PROTECTION indicating
that only you can change your file, but other people on your  project
can read it.
%text
Remember that the filename and extension can contain letters
and digits, but no other characters like brackets, punctuation
marks or the like.
%question comment extension;
What is the extension of the file TEST.LSP <055>?
%noextra
%right LSP
LSP means that this is a LISP source program file.
%right . LSP
%same
%wrong LISP
The language is LISP, but the extension is shorter.
%extra
%wrong 5
5 is part of the protection code, not of the extension.
%wrong LSP
Answer with the extension only and nothing else.
%wrong 055
<055> is the protection code.
%wrong
The extension is the three letters after the dot.
%wrong
For the file TEST.LSP, the extension is LSP, which means that
it is a LISP source program file.
%goto next
%question comment fortran file name;
If you have a source program MYPROG in FORTRAN, how do you
indicate that file? In extensions, FORTRAN is shortened to FOR.
%extra
%order
%right MYPROG . FOR
%wrong MYPROG
MYPROG is right, but the extension is wrong.
%wrong TEST
The name of the program was "MYPROG" and not "TEST".
%wrong . FOR
Put the full name of the program in front of the extension.
%lack .
There must be a dot between the filename and the extension.
%wrong f4
Please use the extension .FOR
%wrong f10
%same
%wrong
Just take the filename, a dot, and the extension.
%wrong
The extension for FORTRAN source program files is FOR.
%same
%wrong
The correct answer is MYPROG.FOR.
%goto next
%question comment size of filenames;
What is the maximum number of characters allowed in a filename?
%right 6
%right six
%wrong
%wrong
The correct answer is that a filename can not have more than
six characters.
%goto next
%question comment size of extensions;
What is the maximum number of characters allowed in an extension
to a filename?
%right 3
%right three
%wrong 6
The extension is shorter than the filename.
%wrong six
%same
%wrong 4
Do not count the dot.
%wrong four
%same
%wrong
The correct answer is that an extension to a filename can not
have more than three characters.
%wrong
%same
%question comment character set;
What kind of characters are allowed in filenames and extensions?
%noorder
%extra
%right letter digit
%right letter num
%right alpha meric
%right alpha digit
%right alpha num
%right alpha figure
%right letter figure
%wrong alfa
Please write "alpha" instead of "alfa".
%wrong octal
Much more than octal digits is allowed here.
%wrong letter
Not only letters are allowed, but also another kind of characters.
%wrong alpha
%same
%wrong digit
Not only digits are allowed, but one other kind of characters.
%wrong num
%same
%wrong figure
%same
%wrong all
A hint: FILE15 is allowed but not %F7[6]&&.
%wrong
%same
%wrong
%wrong
You can repeat part of this lesson now.
%goto whatisafile
%text protectioncode:
The protection code.
===================

The protection code consists of three digits.
The first digit says what you yourself, as the owner of the file,
can do to it,  the second digit what other people on the same
project as you can do to the file, and the third digit what
other people on the computer can do to your file.
%question comment first protection code number;
If the protection code for a certain file is <057>
then what person's rights are governed by the 0?
%extra
%right me
%right myself
%right self
%right programmer
%right my rights
%right my
%right mine
%right owner
%right own
%right user
%noextra
%right I
%extra
%wrong all
The third digit governs the rights of all other programmers,
not the first digit.
%wrong every
%same
%wrong other
%same
%wrong you
Assume that you yourself are logged in on the project-programmer
number whose files we are discussing.
%wrong
A hint: The first digit governs the right of only one person.
%wrong
%goto protectioncode
%question comment second protection code digit;
If the protection code for a certain file is <057>
then what people's rights are governed by the second digit, 5?
%extra
%right my project
%right project
%right proj
%wrong my
Your own rights are governed by the first digit,
not by the second digit.
%wrong me
%same
%wrong other
Not all other people, only some of them.
%wrong proect
You forgot the "j" in the word "project".
%wrong
A hint: The second digit gives the rights for an intermediate
group, not only yourself, but neither all people using the
computer.
%wrong
The second digit gives the rights for other people on your
own project.
%goto next
%question comment third protection code digit;
And what people's rights are governed by the third digit,
that is by 7 in the protection code <057>?
%right all
%right every
%right rest
%right anyone
%right not project
%right computer
%right other
%right outside
%right else
%right any
%wrong sys
%right anybody
The system people can always access everything, since they
are allowed to surpass all protection gadgets in the system.
But the third digit is for a larger group than only the
system people.
%wrong
A hint: The third digit indicate the rights of access to
the file for the largest group of people.
%wrong
Is this a selected group of computer users, or is it
all the users?
%wrong
%goto protectioncode
%text
Each digit in the protection code can have a value from 0 to 7,
where 0 indicates all rights and 7 no rights.
Here is the meaning of all the values:

7  No access rights
6  Execute the file only
5  Read and execute the file
4  Append, read and execute the file
3  Update, append, read and execute the file
2  Write, update, append, read and execute the file
1  Rename, write, update, append, read and execute the file
0  Change protection, rename, write, update, append, read and
   execute the file.
%text threeimportant:
The most important codes to remember are 7, 5 and 0.
7 is no rights at all,
5 is no rights to modify the file in any way,
  but rights to read and execute it,
0 is rights to do anything you like
  to the file.

The normal protection for new files is <057>, that is
you yourself can do anything you like, other people on
your project can read it, people outside your project
have no rights at all.
%question comment protection code value;
Which protection code value indicates no rights at all?
%noextra
%right 7
%extra
%right 777
%right seven
%wrong 0
Zero gives the largest rights of access to a file.
%wrong zero
%same
%wrong null
%same
%wrong 1
The codes 1 through 6 all indicate some rights, more times
for smaller protection codes.
%wrong 2
%same
%wrong 3
%same
%wrong 4
%same
%wrong 5
%same
%wrong 6
%same
%wrong
A hint: The protection code can take on only values between
0 and 7.
%wrong
%goto threeimportant
%question comment only read;
Which protection code value indicates rights to read
and execute, but no rights to modify a file?
%noextra
%right 5
%right 555
%extra
%right five
%wrong 5
I expected only one digit.
%wrong
%wrong
The correct answer is 5.
%goto next
%question comment all rights protection code value;
And which protection code indicates rights
to do anything you want to a file?
%noextra
%right 0
%extra
%right nought
%right zero
%right null
%if qz
%right noll
%ifend qz
%wrong o
You probably typed the letter "O" instead of the zero digit "0".
%wrong 7
Seven indicates the smallest rights of access to a file.
%wrong 8
The protection code can only take values between 0 and 7.
%wrong 0
I expected only one digit.
%wrong
%wrong
%wrong
The correct answer is 0, that is, zero.
%goto next
%text summary:
Summary
=======

The protection code is specified in the format
	<abc>
where a,b and c are octal digits.
a is the protection against the owner,
b is the protection against people with the same project number,
c is the protection against all others.

Digit	Meaning
-----   -------
7	No access rights
6	Execute the file only
5	Read and execute the file
4	Append, read and execute the file
3	Update, append, read and execute the file
2	Write, update, append, read and execute the file
1	Rename, write, update, append, read and execute the file
0	Change protection, rename, write, update, append, read and
	execute the file.
%end