1) How many bits of the mode of a file can be changed by chmod? 12 2) What does it mean if the word OOPS appears on your screen? Your program is using termcap(3) wrongly. 3) From tjo: What, according to K&R, is wrong with this piece of C: #include main() { int entry; entry = 0; exit(0); } "entry" is an unused reserved word. 4) How many in-core inodes are used by a pipe? 1 in V7 etc. You need 2 pointers into the buffer, for reading and writing. An inode only contains one pointer for this purpose, but the file length field is used for the other. May be 2 on 4.2BSD where pipes are implemented as a pair of sockets (grooh!) 5) Why do many C source code files begin with a line containing a single # character? Because the V6 C compiler only invoked the C preprocessor if they did. 6) Give a command line to put the standard output and the standard error output from a program called "prog" into two separate files a) for the C-shell (csh) b) for the Bourne shell (sh) a) (prog > out) >& err b) prog > out 2> err 7) What difference is there between the *roff commands .so and 'so? The soelim command does not process 'so commands. 8) Suggested by mtr from the network news: You have 42 files in your working directory called *.pas. Rename them to *.px with a single line csh or sh script. eval `ls -d *.pas | sed 's/\(.*\).pas/mv \1.pas \1.px;/'` works under both sh and csh. 9) What are the relative merits of the two lines: find / -name 't#*' -exec rm -f {} \; rm -f `find / -name 't#*' -print` The second only execs one find and one rm, but may fall over if the output of the find command is immense ( >10K in the C-shell, I think) The first is less efficient, but does not suffer from this restriction. 10) A large C program (in fact, the run-time system for the occam compiler) works fine normally, but goes into an infinite loop if I control-C it. It catches all fatal signals so that it can reset the terminal modes before exiting. Suggest a likely reason why it goes bonkers. The signal-handling code is causing a signal somehow. 11) What does the "cat" command do? No marks for this one - it was in the vein of the question on the Civil Service entrance exam one year - "Write down everything you know". I would have said "rtfm" or "everything but make the tea". Results out of 10: steve@hlh 8 cmd 7.5 jmh 5.5 tjo 5