Computer Science 2211A/B Midterm: CS 2211a Midterm 2018 Solutions

462 views9 pages

Document Summary

Instructions/notes: the examination has 35 questions on 9 pages, and a total of 110 marks. Correct answers are in blue. mkdir cd nl passwd grep cat chmod scriptfix mv: [1 mark] the unix command echo home will print the contents of the environment variable whose name is home. True false: [1 mark] in c, the null character is another name for the null pointer. True false: [3 marks] the protection code for the file abc. dat is currently rwxr--r-- . The command chmod ug+w abc. dat is equivalent to the command: chmod 766 abc. dat, chmod 764 abc. dat, chmod 754 abc. dat, chmod 222 abc. dat, none of the above. 2: [3 marks] the protection code for def. dat is currently dr-xr--r-- , and the protection code for def. dat/ghi. dat is currently -r-xr--r-- . True false: [1 mark] absolute path names for files in a unix system always begin with the character /".