<<

134 M/C Questions -1- 1 Minute Per Question 134 M/C Questions -2- 1 Minute Per Question

5. User bob is in groups bg1 and bg2.User pat is in group pgg. PRINT Name: dr-x-wx--- 2 pat bg1 60 Jan 1 1:00 foo -rwxrwxr-x 1 pat ted 0Jan 1 1:00 foo/bar Version: 774 One-Answer Multiple Choice 134 Questions − 40 of 40% a. bob can create a newfile in the directory ☞ Read all the words of these instructions and both sides (back and front) of all pages. b. pat can create a newfile in the directory ☞ Put your Name on this Question Sheet. Youmay or drawonthis Question Sheet. c. bob can list names in the directory ☞ Use your full, unabbreviated name on the mark-sense form. Do not abbreviate your name. d. bob can access and write on the file ☞ Put the three-digit Test Version above into both NO. OF QUESTIONS and NO. OF STUDENTS e. pat can rename the file ☞ Fill in the bubbles with pencil only,nopen. Enter your NAME, Test Version, and answers. ☞ Manage your . Answer questions you know, first. One Answer per question. 6. Giventhe following, can user bird in group sesame copy ./foo to bar? drwxrw-r-x 2 root sesame 4096 Oct 7 14:00 . -rwx-wx-wx 1 bird sesame 123 Oct 4 14:05 foo 1. User bob is in groups bg1 and bg2.User pat is in group pgg. a. No, because the directory is not accessible to bird d-wx---rw- 2 bob ted 60 Jan 1 1:00 foo b. No, because the directory has no write permissions for others ----rwxrwx 1 bob bg2 0Jan 1 1:00 foo/bar c. No, because foo has no read permissions for bird a. pat can rename the file d. , because bird has write permissions on foo b. pat can access and write on the file e. Yes; permissions don’tapply because bird owns foo c. bob can access and write on the file 7. In an empty directory,what is output on your screen by: d. bob can list names in the directory -p a/b/c 1/2/3 ; a/b 1/2/3 ; . -name c e. bob can create a newfile in the directory a. ./1/2/3/c b. ./1/2/3/b/c c. ./1/2/a/b 2. What permissions are givento newdir after this line: d. ./a/b/c e. ./1/2/3/a/b umask 156 ; mkdir newdir 8. What value umask givesanew file permissions r--r-----? a. r-x--x--- b. rw------ c. rw--w---x a. 237 b. 110 c. 440 d. 220 e. 446 d. r-x-w-rw- e. --xr-xrw- 9. Giventhe following, can user bird in group sesame copy ./foo to bar? 3. Giventhis successful command line (note the argument): drwx-wx--x 2 root sesame 4096 Oct 7 14:00 . /tmp ; mkdir dir ; cd dir ; u-x . --wxrwxrwx 1 bird sesame 123 Oct 4 14:05 foo next command will execute without any"permission denied" errors? a. No, because the directory is not readable by bird a. . b. ls /tmp/dir/.. b. No, because foo has no read permissions for bird c. ls /tmp/dir d. ls /tmp/dir/. c. Yes, because bird has write permissions on foo e. ls .. d. Yes; permissions don’tapply because bird owns foo 4. Giventhe following, can user bird in group sesame rename ./foo to bar? e. No, because the directory has no write permissions for bird d----wx--- 2 root sesame 4096 Oct 7 14:00 . 10. Giventhe following, can user bird in group sesame append to ./foo? ------1 bird sesame 123 Oct 4 14:05 foo dr-xr-xr-x 2 root sesame 4096 Oct 7 14:00 . a. Yes, because bird’s group matches the group writable directory -r-xrwxrwx 1 bird sesame 123 Oct 4 14:05 foo b. Yes; permissions don’tapply because bird owns foo a. No, because bird has no write permissions on foo c. No, because the directory has no permissions for other users b. No, because bird has no write permission on the directory d. No, because bird has no permissions on foo c. No, because execute permissions are not set for bird on foo e. No, because bird cannot read the directory d. Yes; permissions don’tapply because bird owns foo e. No, because the directory is not accessible to bird

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -3- 1 Minute Per Question 134 M/C Questions -4- 1 Minute Per Question

11. User bob is in groups bg1 and bg2.User pat is in group pgg. 17. Giventhe following, can user bird in group sesame append to ./foo? d-w-rw---x 2 bob ted 60 Jan 1 1:00 foo dr-xr-xr-x 2 root sesame 4096 Oct 7 14:00 . --w-rwxrwx 1 pat bg1 0Jan 1 1:00 foo/bar -rw-r-xr-x 1 bird sesame 123 Oct 4 14:05 foo a. bob can list names in the directory a. No, because the directory is not accessible to bird b. pat can rename the file b. Yes, because bird has write permissions on foo c. bob can access and write on the file c. No, because execute permissions are not set for bird on foo d. bob can create a newfile in the directory d. No, because bird has no write permission on the directory e. pat can access and write on the file e. Yes; permissions don’tapply because bird owns foo 12. Dereference the following symlink bar into its equivalent absolute path: 18. signals in increasing order of strength: -s ../b/../../a/../foo /tmp/a/b/bar a. TERM HUP b. KILL HUP TERM a. /tmp/a/b/bar b. /tmp/foo c. /tmp/a/foo c. HUP KILL TERM d. HUP TERM KILL d. /tmp/b/foo e. /tmp/b/bar e. TERM KILL HUP 13. Can three different files have the same inode number on three different file systems? 19. User bob is in groups bg1 and bg2.User pat is in group pgg. a. no: inode numbers are unique across all file systems dr-xrwx-wx 2 pat pgg 60 Jan 1 1:00 foo b. yes: if the files are all names for the same inode -r-xrwxr-x 1 bob bg2 0Jan 1 1:00 foo/bar c. no: inode numbers only apply to directories, not files a. bob can access and write on the file d. yes: inode numbers are only unique inside a file system b. bob can list names in the directory e. no: you can’thav e inode numbers on three file systems c. pat can access and write on the file 14. Givenmydirectory dir and my file dir/bar owned by me, which permissions d. pat can rename the file allowmetoaccess and change or create newcontent (data) in the file dir/bar e. bob can create a newfile in the directory butnot delete the file? 20. Other than root, can change the permissions of the following directory? a. Permissions 600 on directory dir and 700 on file dir/bar. dr-xrwxrwx 17 foo bar 4096 Apr 15 16:40 . b. Permissions 400 on directory dir and 400 on file dir/bar. a. only root can change the permissions c. Permissions 500 on directory dir and 600 on file dir/bar. b. user foo and anyuser in group bar d. Permissions 300 on directory dir and 200 on file dir/bar. c. anyone except user foo e. Permissions 100 on directory dir and 100 on file dir/bar. d. only user foo 15. Which command counts the number of Unix permission groups you are in? e. only users in group bar a. umask | b. groups | wc 21. Which command line belowdoes not showany lines from inside the file out? c. id | wc d. wc groups a. out b. wc out c. out e. groups | wc d. out e. out 16. A Unix/Linux "tarball" is: 22. User bob is in groups bg1 and bg2.User pat is in group pgg. a. amulti-file directory containing individual compressed files dr---wx--x 2 bob ted 60 Jan 1 1:00 foo b. asingle-file that contains individual compressed files -r-xrwxrwx 1 pat bg1 0Jan 1 1:00 foo/bar c. asingle compressed file containing one uncompressed file a. bob can create a newfile in the directory d. amulti-file directory containing individual uncompressed files b. pat can access and write on the file e. asingle-file that contains individual uncompressed files c. pat can rename the file d. bob can access and write on the file e. bob can list names in the directory 23. What minimal permissions must you have onadirectory to be able to execute successfully the command ls . from inside the directory? a. r-x b. --x c. rw- d. r-- e. -wx

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -5- 1 Minute Per Question 134 M/C Questions -6- 1 Minute Per Question

24. User bob is in groups bg1 and bg2.User pat is in group pgg. 31. Under what directory are system configuration files usually stored? d--xr----x 2 bob ted 60 Jan 1 1:00 foo a. /usr/bin b. /log/var/ c. /etc --w--w-r-x 1 bob bg1 0Jan 1 1:00 foo/bar d. /bin/ e. /var/log/ a. pat can rename the file 32. The -v option to the command does what? b. bob can create a newfile in the directory a. selects lines that do not contain a match for the supplied pattern c. pat can access and write on the file b. turns offthe translation of unprintable characters d. bob can list names in the directory c. prints the version number of the grep command e. bob can access and write on the file d. selects lines that do not contain unprintable characters 25. User bob is in groups bg1 and bg2.User pat is in group pgg. e. turns on the translation of unprintable characters dr-xrwx--x 2 pat pgg 60 Jan 1 1:00 foo 33. User bob is in groups bg1 and bg2.User pat is in group pgg. --w----r-x 1 bob bg2 0Jan 1 1:00 foo/bar d--xrwx-wx 2 bob ted 60 Jan 1 1:00 foo a. bob can access and write on the file -r-x-w-r-x 1 bob bg2 0Jan 1 1:00 foo/bar b. pat can access and write on the file a. pat can access and write on the file c. pat can rename the file b. pat can rename the file d. bob can create a newfile in the directory c. bob can create a newfile in the directory e. bob can list names in the directory d. bob can list names in the directory 26. Which command usually goes in your .bash_profile file? e. bob can access and write on the file a. source ./.bash_profile b. source ./.bashrc 34. In an empty directory,what is output on your screen by: c. ./.bashrc source d. ./.bash_profile source mkdir -p a/b/c 1/2/3 ; mv a 1/2 ; find . -name c e. ./.bashrc a. ./1/a b. ./1/2/3/a/b/c 27. In an empty directory,what permissions are on file ??? after these commands: c. ./1/2/a/b/c d. ./1/2/a ??? *** ; chmod 111 * e. ./1/2/3/a/b chmod 222 ??? ; chmod 444 '***' 35. What command terminates processes based on their name (not safe!): a. rw-rw-rw- b. -w--w--w- c. --x--x--x a. b. crontab c. kill d. r--r--r-- e. -wx-wx-wx d. lxww e. dmesg bob foo 28. When auser named runs a command in an executable file owned by ,ina 36. In an empty directory,what permissions are on file ??? after these commands: directory owned by root,the file executes with the permissions of: touch ??? *** ; chmod 111 * a. root b. root and foo c. foo chmod 222 ? ; chmod 444 '*' d. bob e. root and bob a. r--r--r-- b. -w--w--w- c. -wx-wx-wx 29. When auser named bob runs a command in a setuid executable file owned by d. rw-rw-rw- e. --x--x--x foo root ,inadirectory owned by ,the file executes with the permissions of: 37. Tobring a background job into the foreground, : a. root b. bob c. root and bob a. fg b. bg c. kill %1 d. foo e. root and foo d. [Ctrl-Z] e. [Ctrl-D] bob bg1 bg2 pat pgg 30. User is in groups and .User is in group . 38. Givenmydirectory dir and my file dir/c owned by me, which permissions d-wxr-xrw- 2 bob pgg 60 Jan 1 1:00 foo allowmetoaccess and change or create newcontent (data) in the file dir/c but -r-xrwxr-x 1 bob bg1 0Jan 1 1:00 foo/bar not delete the file? bob a. can create a newfile in the directory a. Permissions 100 on directory dir and 100 on file dir/c. bob b. can list names in the directory b. Permissions 100 on directory dir and 200 on file dir/c. pat c. can access and write on the file c. Permissions 400 on directory dir and 400 on file dir/c. pat d. can rename the file d. Permissions 600 on directory dir and 700 on file dir/c. bob e. can access and write on the file e. Permissions 200 on directory dir and 200 on file dir/c.

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -7- 1 Minute Per Question 134 M/C Questions -8- 1 Minute Per Question

39. The password :x: in /etc/ means: 46. User bob is in groups bg1 and bg2.User pat is in group pgg. a. the unencrypted password is stored in the group file dr-xrw-rwx 2 pat bg1 60 Jan 1 1:00 foo b. the account is locked -rwxrwxrwx 1 pat ted 0Jan 1 1:00 foo/bar c. the encrypted password is "x" a. pat can create a newfile in the directory d. the password is locked b. bob can list names in the directory e. the encrypted password is stored in the shadowfile c. bob can rename the file 40. What value umask givesanew file permissions r--r-----? d. pat can rename the file a. 440 b. 337 c. 446 d. 220 e. 110 e. bob can access and write on the file 41. User bob is in groups bg1 and bg2.User pat is in group pgg. 47. Which command line creates a directory dir into which anyone can put a file, but in d---rwx--x 2 pat pgg 60 Jan 1 1:00 foo which nobody can see the names of the files that are there? --w----rwx 1 bob bg1 0Jan 1 1:00 foo/bar a. mkdir dir ; chmod 333 . a. bob can list names in the directory b. mkdir dir ; cd dir ; chmod ugo-rw . b. pat can rename the file c. mkdir dir ; chmod 333 dir c. bob can create a newfile in the directory d. mkdir dir ; chmod 222 dir d. bob can access and write on the file e. mkdir dir ; cd dir ; chmod ugo=w . e. pat can access and write on the file 48. User bob is in groups bg1 and bg2.User pat is in group pgg. 42. User bob is in groups bg1 and bg2.User pat is in group pgg. d-wx--x--x 2 bob ted 60 Jan 1 1:00 foo dr-xr-xrwx 2 pat bg1 60 Jan 1 1:00 foo -r-xr-xrwx 1 pat bg2 0Jan 1 1:00 foo/bar -rwxrwxr-x 1 pat ted 0Jan 1 1:00 foo/bar a. pat can rename the file a. pat can create a newfile in the directory b. bob can create a newfile in the directory b. bob can access and write on the file c. bob can access and write on the file c. bob can list names in the directory d. bob can list names in the directory d. pat can rename the file e. pat can access and write on the file e. bob can rename the file 49. Givenmydirectory dir and my file dir/bar owned by me, which permissions 43. Under what directory are system log files usually stored? allowmetoaccess and change or create newcontent (data) in the file dir/bar butnot delete the file? a. /usr/bin b. /log/var c. /etc/log d. /var/log e. /bin/ a. Permissions 500 on directory dir and 100 on file dir/bar. b. Permissions 400 on directory dir and 400 on file dir/bar. 44. User bob is in groups bg1 and bg2.User pat is in group pgg. c. Permissions 600 on directory dir and 700 on file dir/bar. d-w---xr-x 2 pat ted 60 Jan 1 1:00 foo d. Permissions 200 on directory dir and 200 on file dir/bar. -rwxr-xrwx 1 pat bg2 0Jan 1 1:00 foo/bar e. Permissions 500 on directory dir and 200 on file dir/bar. a. pat can access and write on the file bob bg1 bg2 pat pgg b. bob can access and write on the file 50. User is in groups and .User is in group . dr-xrwxrw- 2 pat pgg 60 Jan 1 1:00 foo bob c. can rename the file --w----r-x 1 bob bg1 0Jan 1 1:00 foo/bar d. bob can create a newfile in the directory pat e. bob can list names in the directory a. can access and write on the file b. bob can access and write on the file 45. The minimum permissions you need to delete a file foo from directory a are: c. bob can list names in the directory a. wx on a,none on foo b. rwx on a,none on foo d. bob can create a newfile in the directory c. rwx on a, rw on foo d. wx on a, r on foo e. pat can rename the file e. wx on a, w on foo 51. What value umask givesanew file permissions r--r-----? a. 110 b. 326 c. 447 d. 440 e. 220

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -9- 1 Minute Per Question 134 M/C Questions -10- 1 Minute Per Question

52. User bob is in groups bg1 and bg2.User pat is in group pgg. 58. If Imount sda1 on /one and sda2 on /two, howcan I the existing file d-wx----w- 2 pat pgg 60 Jan 1 1:00 foo /one/foo to the newpathname /two/bar? -rwxrwxr-x 1 bob bg2 0Jan 1 1:00 foo/bar a. ln /one/bar /two/foo a. bob can create a newfile in the directory b. ln -s /one/foo /two/bar b. bob can access and write on the file c. ln /one/foo /two/bar c. pat can access and write on the file d. ln /two/bar /one/foo d. pat can rename the file e. ln -s /two/bar /one/foo e. bob can list names in the directory 59. What command changes a user’spassword? 53. Giventhe following, can user bird in group sesame append to foobar? a. chpasswd b. c. mkpasswd drwx--xrwx 2 root sesame 4096 Oct 7 14:00 . d. password e. passwd -rw------1 bird sesame 1024 Oct 4 14:05 foobar 60. In an empty directory,what is output on your screen by: a. No, because the directory is not accessible to bird mkdir -p a/b/c 1/2/3 ; mv a/b 1/2 ; find . -name c b. No, because sesame has no write permissions on foobar a. ./1/2/a/b b. ./1/2/c c. ./1/a/b c. Yes, because bird has write permissions on foobar d. ./a/b/c e. ./1/2/b/c d. No, because execute permissions are not set for bird on foobar bar e. Yes, because bird owns foobar 61. Dereference the following symlink into its equivalent absolute path: ln -s ../b/../../a/./foo /tmp/a/b/bar 54. User bob is in groups bg1 and bg2.User pat is in group pgg. a. /tmp/foo b. /tmp/b/bar c. /tmp/a/b/bar d--x----w- 2 pat ted 60 Jan 1 1:00 foo /tmp/b/foo /tmp/a/foo --w-r-xrwx 1 pat bg2 0Jan 1 1:00 foo/bar d. e. a. pat can access and write on the file 62. User bob is in groups bg1 and bg2.User pat is in group pgg. drw------x 2 pat ted 60 Jan 1 1:00 foo b. bob can access and write on the file --w--w-r-x 1 pat bg1 0Jan 1 1:00 foo/bar c. bob can create a newfile in the directory d. bob can list names in the directory a. bob can rename the file e. pat can rename the file b. bob can list names in the directory c. pat can access and write on the file crontab 13:54 55. Which line executes ev ery day? d. bob can access and write on the file a. 13 54 * * * command b. ***1354command e. bob can create a newfile in the directory c. ***5413command d. 13 * * * 54 command 54 13 * * * command 63. What is the output of this command line in an empty directory: e. touch .a .b .c ; echo [.]* 56. What value umask givesanew directory permissions rw--w---x? a. .a .b .c a. 211 b. 156 c. 621 d. 421 e. 432 b. [.]* 57. User bob is in groups bg1 and bg2.User pat is in group pgg. c. ....a.b.c drw-r-xrwx 2 pat bg1 60 Jan 1 1:00 foo d. no output -rwxrwxr-x 1 pat ted 0Jan 1 1:00 foo/bar e. an error message from echo saying [.]* does not exist a. pat can rename the file 64. Which command line creates a directory dir into which anyone can put a file, but in b. bob can rename the file which nobody can see the names of the files that are there? c. bob can access and write on the file a. mkdir dir ; chmod 777 dir d. pat can create a newfile in the directory b. mkdir dir ; cd dir ; chmod go-x . e. bob can list names in the directory c. mkdir dir ; cd dir ; chmod go+wx . d. mkdir dir ; chmod 777 . e. mkdir dir ; chmod 333 dir

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -11- 1 Minute Per Question 134 M/C Questions -12- 1 Minute Per Question

65. The shadowpassword file is used: 70. User bob is in groups bg1 and bg2.User pat is in group pgg. a. to hide encrypted passwords from viewing by ordinary users d-w-rwx-wx 2 bob ted 60 Jan 1 1:00 foo b. to allowpasswords to exist on partitions other than the ROOT -r-xrwxrwx 1 pat bg2 0Jan 1 1:00 foo/bar c. to store secondary passwords for times when you forget your main one a. pat can access and write on the file d. to keep a back-up of the main password file in case of corruption b. pat can rename the file e. to reduce the size of the main password file for faster access c. bob can list names in the directory 66. If the current directory contains 10 visible files and 5 visible sub-directories, what is d. bob can create a newfile in the directory the output on your screen of this command: ls -d */. e. bob can access and write on the file a. no output 71. The output of the command is: b. an error message because */. does not exist a. alist of users logged in to the system c. 15 pathnames b. alist of accounts in the password file d. 5directory names c. your userid e. */. d. your HOME directory 67. Tochange your own account password, use this exact command line: e. the current directory a. $passwd cst8207.idallen.ca 72. User bob is in groups bg1 and bg2.User pat is in group pgg. b. $passwd dr-xrwx-wx 2 pat ted 60 Jan 1 1:00 foo c. $passwd idallen-ubuntu -r-xr-xrwx 1 pat bg2 0Jan 1 1:00 foo/bar d. $passwd cst8207 a. pat can create a newfile in the directory e. $passwd 10.50.254.150 b. pat can access and write on the file 68. User bob is in groups bg1 and bg2.User pat is in group pgg. c. bob can access and write on the file dr-x----wx 2 pat ted 60 Jan 1 1:00 foo d. bob can rename the file -r-xr-xrwx 1 pat bg1 0Jan 1 1:00 foo/bar e. bob can list names in the directory a. bob can list names in the directory 73. User bob is in groups bg1 and bg2.User pat is in group pgg. b. pat can access and write on the file d-wx-w-rwx 2 pat bg1 60 Jan 1 1:00 foo c. pat can rename the file -rwxrwxrwx 1 pat ted 0Jan 1 1:00 foo/bar d. bob can access and write on the file a. bob can list names in the directory e. bob can create a newfile in the directory b. bob can rename the file 69. Givenmydirectory dir and my file dir/bar owned by me, which permissions c. bob can create a newfile in the directory allowmetodelete the file dir/bar from the directory,but not change the content d. pat can create a newfile in the directory (data) in the file? e. bob can access and write on the file a. Permissions 100 on directory dir and 200 on file dir/bar. 74. In adirectory containing one file named dog,what is the output on your screen b. Permissions 100 on directory dir and 100 on file dir/bar. after this command line: 2>/dev/null ls nosuchfile c. Permissions 500 on directory dir and 400 on file dir/bar. a. nosuchfile d. Permissions 300 on directory dir and 300 on file dir/bar. b. no output e. Permissions 300 on directory dir and 500 on file dir/bar. c. dog d. ls: nosuchfile: No such or directory e. bash: 2>/dev/null: command not found

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -13- 1 Minute Per Question 134 M/C Questions -14- 1 Minute Per Question

75. User bob is in groups bg1 and bg2.User pat is in group pgg. 81. Giventhe following, can user bird in group sesame remove ./foo? dr-x-wx--x 2 bob ted 60 Jan 1 1:00 foo drwxr-xrwx 2 root sesame 4096 Oct 7 14:00 . -r-xr-xrwx 1 pat bg1 0Jan 1 1:00 foo/bar -rwxrwxrwx 1 bird sesame 123 Oct 4 14:05 foo a. bob can access and write on the file a. No, because bird has no write permission on the directory b. bob can list names in the directory b. Yes; permissions don’tapply because bird owns foo c. bob can create a newfile in the directory c. Yes, because bird has full permissions on foo d. pat can access and write on the file d. No, because the directory is not accessible to bird e. pat can rename the file e. Yes, because bird matches the writable other permissions 76. The minimum permissions you need to read a file foo in directory a are: 82. What value to chmod would change the permissions on a file to r-----rw-? a. wx on a,none on foo b. rwx on a,none on foo a. 122 b. 654 c. 406 d. 102 e. 322 c. wx on a, w on foo d. x on a, r on foo 83. User bob is in groups bg1 and bg2.User pat is in group pgg. e. rwx on a, rw on foo d--x-wx--- 2 bob pgg 60 Jan 1 1:00 foo 77. Which of these commands makes a file owned by me, also readable by me? -r-x-w-r-x 1 bob bg1 0Jan 1 1:00 foo/bar a. chmod r=u ./myfile b. chmod u+r ./myfile a. pat can rename the file c. umask 400 myfile d. chmod r+u myfile b. bob can access and write on the file e. umask 300 ./myfile c. bob can create a newfile in the directory 78. User bob is in groups bg1 and bg2.User pat is in group pgg. d. bob can list names in the directory dr--r-x-w- 2 bob pgg 60 Jan 1 1:00 foo e. pat can access and write on the file -rwxrwxr-x 1 bob bg2 0Jan 1 1:00 foo/bar 84. User bob is in groups bg1 and bg2.User pat is in group pgg. a. bob can list names in the directory d--xr-x-w- 2 bob pgg 60 Jan 1 1:00 foo b. pat can access and write on the file --w----r-x 1 bob bg2 0Jan 1 1:00 foo/bar c. pat can rename the file a. bob can access and write on the file d. bob can access and write on the file b. pat can access and write on the file e. bob can create a newfile in the directory c. bob can create a newfile in the directory 79. Givenmydirectory dir and my file dir/foo owned by me, which permissions d. pat can rename the file allowmetoaccess and change or create newcontent (data) in the file dir/foo e. bob can list names in the directory butnot delete the file? 85. Giventhe following, can user bird in group sesame copy ./foo to bar? a. Permissions 100 on directory dir and 100 on file dir/foo. drwxr-xrwx 2 root sesame 4096 Oct 7 14:00 . b. Permissions 600 on directory dir and 700 on file dir/foo. -r-xr-xr-x 1 bird sesame 123 Oct 4 14:05 foo c. Permissions 300 on directory dir and 200 on file dir/foo. a. Yes; permissions don’tapply because bird owns foo d. Permissions 500 on directory dir and 600 on file dir/foo. b. Yes, because bird has read permissions on foo e. Permissions 400 on directory dir and 400 on file dir/foo. c. No, because the directory is not accessible to bird 80. What command displays the groups you are in? d. No, because foo has no write permissions for bird a. grouprint b. mkgroups c. gpasswd e. No, because the directory has no write permissions for bird d. lstgroups e. groups 86. What value to chmod would change the permissions on a file to rw-r--r--? a. 344 b. 211 c. 644 d. 244 e. 311

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -15- 1 Minute Per Question 134 M/C Questions -16- 1 Minute Per Question

87. User bob is in groups bg1 and bg2.User pat is in group pgg. 93. What command displays the kernel ring buffer of log messages: d--xrwx--x 2 bob ted 60 Jan 1 1:00 foo a. ps lxww b. psmine c. crontab ----rw--w- 1 bob bg1 0Jan 1 1:00 foo/bar d. dmesg e. showall a. bob can create a newfile in the directory 94. Tolist your personal crontab, type: b. bob can access and write on the file a. /var/log/crontab b. crontab -l c. pat can rename the file c. atq d. cat crontab d. pat can access and write on the file e. /etc/crontab e. bob can list names in the directory 95. User bob is in groups bg1 and bg2.User pat is in group pgg. 88. Givenmydirectory dir and my file dir/bar owned by me, which permissions d-wxrwx-w- 2 pat ted 60 Jan 1 1:00 foo allowmetodelete the file dir/bar from the directory,but not change the content -r-xr-xrwx 1 pat bg1 0Jan 1 1:00 foo/bar (data) in the file? a. pat can access and write on the file a. Permissions 600 on directory dir and 300 on file dir/bar. b. pat can rename the file b. Permissions 700 on directory dir and 500 on file dir/bar. c. bob can create a newfile in the directory c. Permissions 500 on directory dir and 500 on file dir/bar. d. bob can list names in the directory d. Permissions 600 on directory dir and 500 on file dir/bar. e. bob can access and write on the file e. Permissions 700 on directory dir and 200 on file dir/bar. 96. User bob is in groups bg1 and bg2.User pat is in group pgg. 89. User bob is in groups bg1 and bg2.User pat is in group pgg. drw-rw-rwx 2 pat bg1 60 Jan 1 1:00 foo dr---wx--x 2 bob ted 60 Jan 1 1:00 foo -rwxrwxrwx 1 pat ted 0Jan 1 1:00 foo/bar --w--w-r-x 1 bob bg2 0Jan 1 1:00 foo/bar a. bob can rename the file a. bob can access and write on the file b. pat can create a newfile in the directory b. bob can list names in the directory c. bob can access and write on the file c. bob can create a newfile in the directory d. pat can rename the file d. pat can access and write on the file e. bob can list names in the directory e. pat can rename the file 97. User bob is in groups bg1 and bg2.User pat is in group pgg. 90. If Imount one file system on directory /a and another file system on directory /b, d-wx-w-rwx 2 pat bg2 60 Jan 1 1:00 foo howcan I link the existing file /a/foo to the newpathname /b/new? -rwxrwxrwx 1 pat ted 0Jan 1 1:00 foo/bar a. ln /b/new /a/foo b. ln /a/foo /b/new a. bob can access and write on the file c. ln -s /b/new /a/foo d. ln /a/new /b/foo b. pat can rename the file e. ln -s /a/foo /b/new c. bob can list names in the directory 91. Givenmydirectory dir and my file dir/c owned by me, which permissions d. bob can rename the file allowmetodelete the file dir/c from the directory,but not change the content e. bob can create a newfile in the directory (data) in the file? 98. Toshowall your one-time scheduled commands, type: a. Permissions 500 on directory dir and 400 on file dir/c. a. cat crontab b. atq b. Permissions 100 on directory dir and 100 on file dir/c. c. crontab -l d. /etc/crontab c. Permissions 100 on directory dir and 200 on file dir/c. e. /var/log/crontab d. Permissions 300 on directory dir and 300 on file dir/c. e. Permissions 300 on directory dir and 500 on file dir/c. 92. Dereference the following symlink bar into its equivalent absolute path: ln -s ../b/../b/../../foo /tmp/a/b/bar a. /tmp/foo b. /tmp/b/foo c. /tmp/b/bar d. /tmp/a/b/bar e. /tmp/a/foo

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -17- 1 Minute Per Question 134 M/C Questions -18- 1 Minute Per Question

99. Giventhe following, can user bird in group sesame append to foobar? 104. User bob is in groups bg1 and bg2.User pat is in group pgg. drwxrw-rwx 2 root sesame 4096 Oct 7 14:00 . drw---x--- 2 pat bg2 60 Jan 1 1:00 foo -rw-rw-r-- 1 bird sesame 1024 Oct 4 14:05 foobar -r------w- 1 pat ted 0Jan 1 1:00 foo/bar a. No, because execute permissions are not set for bird on foobar a. bob can rename the file b. No, because the directory is not accessible to bird b. bob can list names in the directory c. Yes, because sesame has write permissions on foobar c. pat can create a newfile in the directory d. Yes, because bird owns foobar d. pat can rename the file e. Yes, because bird has write permissions on foobar e. bob can access and write on the file 100. Givenmydirectory dir and my file dir/f owned by me, which permissions 105. Which of these statements is true? allowmetodelete the file dir/f from the directory,but not change the content a. you can only remove a file name if the file is owned by you (data) in the file? b. you can only makelinks to files owned by you a. Permissions 600 on directory dir and 500 on file dir/f. c. you can change the permissions of anyfile to which you can write b. Permissions 600 on directory dir and 300 on file dir/f. d. you may be able to rename a file evenifyou do not own the file c. Permissions 500 on directory dir and 500 on file dir/f. e. you can only remove a file name if the file is writable by you d. Permissions 700 on directory dir and 200 on file dir/f. 106. In adirectory containing one file named dog,what is the output on your screen e. Permissions 300 on directory dir and 500 on file dir/f. after this command line: 1>/dev/null ls * 101. Giventhis successful command line (note the dot argument): a. bash: 1>/dev/null: command not found cd /home/foo ; mkdir bar ; cd bar ; chmod a-x . b. ls: *: No such file or directory Which of the following subsequent commands will execute without any"permission c. * denied" errors? d. dog a. ls /home/foo/bar/. b. ls /home/foo/bar e. no output ls .. ls . c. d. 107. What command manipulates your personal list of repeated scheduled commands: e. ls /home/foo/bar/.. a. showall b. dmesg c. ps lxww 102. Which of these statements is true? d. crontab e. psmine a. Youcan makeahard link to a directory. 108. Givenmydirectory dir and my file dir/f owned by me, which permissions b. Youonly need "r--"permission on directory "foo"for "ls -l foo"to allowmetoaccess and change or create newcontent (data) in the file dir/f but work. not delete the file? foo bar foo c. To makeahard link to file " "named " ", file " "must exist. a. Permissions 600 on directory dir and 700 on file dir/f. chmod d. If you give mewrite permission on a file owned by you, I can then use b. Permissions 400 on directory dir and 400 on file dir/f. to change its permissions. c. Permissions 100 on directory dir and 200 on file dir/f. e. The "ln"command takes twoarguments, so the maximum number of hard links d. Permissions 200 on directory dir and 200 on file dir/f. afile can have istwo. e. Permissions 500 on directory dir and 100 on file dir/f. 103. User bob is in groups bg1 and bg2.User pat is in group pgg. d-w---xr-- 2 pat ted 60 Jan 1 1:00 foo 109. Which command removesadjacent duplicate lines from a file? -rwxrwxrwx 1 pat bg2 0Jan 1 1:00 foo/bar a. dupl b. unique c. duplicate a. bob can list names in the directory d. e. dup b. bob can create a newfile in the directory 110. When apersonal crontab job runs, the current working directory is set to: c. bob can access and write on the file a. the directory with the name /root d. pat can access and write on the file b. the HOME directory of the user who created the job e. bob can rename the file c. the current directory that was in use when the crontab job was created d. the system ROOTdirectory e. the directory with the name /home

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -19- 1 Minute Per Question 134 M/C Questions -20- 1 Minute Per Question

111. The difference between the system (root)crontab and all the user (personal) 117. Givenmydirectory dir and my file dir/bar owned by me, which permissions crontabs is: allowmetodelete the file dir/bar from the directory,but not change the content a. the system crontab has the date and time in it (data) in the file? b. the personal crontab has the date and time in it a. Permissions 300 on directory dir and 200 on file dir/bar. c. the system crontab also has the userid in it b. Permissions 500 on directory dir and 500 on file dir/bar. d. the personal crontab also has the userid in it c. Permissions 100 on directory dir and 300 on file dir/bar. e. the personal crontab only runs commands once d. Permissions 300 on directory dir and 400 on file dir/bar. 112. The minimum permissions you need to move a file foo from directory a to e. Permissions 100 on directory dir and 500 on file dir/bar. directory b are: 118. When an at job runs, the current working directory is set to: a. wx on a, wx on b,none on foo a. the system ROOTdirectory b. wx on a, wx on b, w on foo b. the directory with the name /root c. rwx on a, wx on b,none on foo c. the current directory that was in use when the at job was created d. rwx on a, wx on b, rw on foo d. the HOME directory of the user who created the job e. wx on a, wx on b, r on foo e. the directory with the name /home 113. User bob is in groups bg1 and bg2.User pat is in group pgg. 119. The minimum permissions you need to append to a file foo in directory a are: d--xr----x 2 bob ted 60 Jan 1 1:00 foo a. rwx on a,none on foo b. wx on a,none on foo -r-x-w-rwx 1 pat bg2 0Jan 1 1:00 foo/bar c. wx on a, w on foo d. rwx on a, rw on foo a. bob can create a newfile in the directory e. x on a, w on foo b. pat can rename the file 120. The minimum permissions you need to copyafile foo from directory a to c. bob can access and write on the file directory b are: d. bob can list names in the directory a. wx on a, wx on b, rw on foo e. pat can access and write on the file b. wx on a, wx on b,none on foo 114. What value umask givesanew file permissions r--r-----? c. x on a, wx on b, r on foo a. 220 b. 440 c. 226 d. 110 e. 446 d. rwx on a, wx on b,none on foo 115. User bob is in groups bg1 and bg2.User pat is in group pgg. e. rx on a, wx on b, w on foo dr-x-wx--x 2 bob ted 60 Jan 1 1:00 foo 121. Giventhe following, can user bird in group sesame append to ./foo? -r-x-w-r-x 1 bob bg1 0Jan 1 1:00 foo/bar dr-xr--r-x 2 root sesame 4096 Oct 7 14:00 . a. bob can access and write on the file -rw-rw-r-- 1 bird sesame 123 Oct 4 14:05 foo b. bob can create a newfile in the directory a. No, because bird has no write permission on the directory c. pat can access and write on the file b. No, because the directory is not accessible to bird d. bob can list names in the directory c. No, because execute permissions are not set for bird on foo e. pat can rename the file d. Yes; permissions don’tapply because bird owns foo 116. User bob is in groups bg1 and bg2.User pat is in group pgg. e. Yes, because bird has write permissions on foo dr---wx--- 2 pat bg2 60 Jan 1 1:00 foo 122. What permissions are givento newfile after this command line: -rw-rw-r-x 1 pat ted 0Jan 1 1:00 foo/bar umask 326 ; touch newfile a. bob can rename the file a. -wx-w-r-x b. r--r----- c. -wxr----- b. bob can access and write on the file d. r--r-x--x e. -wx-w-rw- c. bob can list names in the directory d. pat can rename the file e. pat can create a newfile in the directory

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question 134 M/C Questions -21- 1 Minute Per Question 134 M/C Questions -22- 1 Minute Per Question

123. The minimum permissions you need to link a file foo from directory a to 130. User bob is in groups bg1 and bg2.User pat is in group pgg. directory b are: dr-xr-x-w- 2 bob pgg 60 Jan 1 1:00 foo a. wx on a, wx on b, r on foo -r-xrwxr-x 1 bob bg1 0Jan 1 1:00 foo/bar b. wx on a, wx on b, w on foo a. bob can access and write on the file c. rwx on a, wx on b,none on foo b. pat can access and write on the file d. rwx on a, wx on b, rw on foo c. pat can rename the file e. x on a, wx on b,none on foo d. bob can list names in the directory 124. Givenmydirectory dir and my file dir/bar owned by me, which permissions e. bob can create a newfile in the directory allowmetoaccess and change or create newcontent (data) in the file dir/bar 131. What does the -v option to the grep command do? butnot delete the file? a. prints the version number of the grep command a. Permissions 600 on directory dir and 700 on file dir/bar. b. selects lines that do not contain a match for the supplied pattern b. Permissions 100 on directory dir and 200 on file dir/bar. c. turns on the translation of unprintable characters c. Permissions 200 on directory dir and 200 on file dir/bar. d. turns offthe translation of unprintable characters d. Permissions 100 on directory dir and 100 on file dir/bar. e. selects lines that do not contain unprintable characters e. Permissions 400 on directory dir and 400 on file dir/bar. 132. The signal sent to a foreground process by typing the [Ctrl-C] keyis: 125. In an empty directory,what is output on your screen by: a. SIGKILL b. SIGSTOP c. SIGINT mkdir -p a/b/c 1/2/3 ; mv a/b/c 1/2 ; find . -name c d. SIGTERM e. SIGHUP a. ./1/2/3/a/b/c b. ./1/a/b/c 133. User bob is in groups bg1 and bg2.User pat is in group pgg. c. ./1/2/c d. ./1/2/a/b/c d--x-----x 2 pat pgg 60 Jan 1 1:00 foo e. ./1/2/b/c -r-xrwx-w- 1 bob bg1 0Jan 1 1:00 foo/bar 126. Which command line would showthe inode number of a file? a. pat can rename the file a. cat -l file b. ls -i file c. find -i file b. bob can access and write on the file d. ls -l file e. cat -i file c. bob can create a newfile in the directory 127. User bob is in groups bg1 and bg2.User pat is in group pgg. d. pat can access and write on the file d--x--xrw- 2 bob pgg 60 Jan 1 1:00 foo e. bob can list names in the directory -r-xrwx-w- 1 bob bg2 0Jan 1 1:00 foo/bar 134. Which command line belowdoes not showany lines from inside the file bat? a. bob can access and write on the file a. more bat b. ls bat c. bat b. pat can rename the file d. head bat e. tail bat c. bob can list names in the directory d. bob can create a newfile in the directory e. pat can access and write on the file 128. Which command line displays all the non-hidden names in the current directory that contain the case-insensitive word hi (and no other names)? a. echo *(H,h,I,i)* b. echo ?[HhIiHhIi]? c. echo *[Hh][Ii]* d. echo *[hiHI]* e. echo ?[HhIi]? 129. What command line shows only your own processes, not all processes? a. dmesg b. crontab c. psmine d. ps lxww e. showall

CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question CST 8207 −Fall 2015 − Practice Test #3A − 40% Ian! D. Allen 1Minute Per Question