PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf ·...

24
PRINT Name: Test Version: 389 One-Answer Multiple Choice 183 Questions - 30 of 30% Read all the words of these instructions and both sides (back and front) of all pages. Put your name on this Question Sheet. You may write or draw on this Question Sheet. Use your full, unabbreviated name on the mark-sense form. Do not abbreviate your name. Put the three-digit Test Version above into NO. OF QUESTIONS and NO. OF STUDENTS Fill in the bubbles with pencil only, no pen. Enter your NAME, Test Version, and answers. Manage your time. Answer questions you know, first. One Answer per question. 1. What is the output of this command line in an empty directory: touch .a .b .c ; echo [.]* a. no output b. .a .b .c c. an error message from echo saying [.]* does not exist d. . .. .a .b .c e. [.]* 2. To bring a background shell job into the foreground, type: a. kill %1 b. [Ctrl-Z] c. fg d. bg e. [Ctrl-D] 3. User bob is in groups bg1 and bg2. User pat is in group pgg. d--x-----x 2 pat pgg 60 Jan 1 1:00 foo -r-xrwx-w- 1 bob bg1 0 Jan 1 1:00 foo/bar a. pat can rename the file b. bob can create a new file in the directory c. bob can access and write on the file d. bob can list names in the directory e. pat can access and write on the file 4. To change your own account password, use this exact command line: a. $ passwd cst8207 b. $ passwd idallen-ubuntu c. $ passwd cst8207.idallen.ca d. $ passwd 10.50.254.150 e. $ passwd 5. User bob is in groups bg1 and bg2. User pat is in group pgg. dr-xrwxrw- 2 pat pgg 60 Jan 1 1:00 foo --w----r-x 1 bob bg1 0 Jan 1 1:00 foo/bar a. bob can create a new file in the directory b. pat can access and write on the file c. pat can rename the file d. bob can access and write on the file e. bob can list names in the directory 6. Which is the second DOS logical partition? a. /dev/sd6a b. /dev/sdb1 c. /dev/sda6 d. /dev/sd2a e. /dev/sda2

Transcript of PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf ·...

Page 1: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

PRINT Name:

Test Version: 389 One-Answer Multiple Choice 183 Questions − 30 of 30%

☞ Readall the words of these instructions andboth sides (back and front) of all pages.☞ Put your name on this Question Sheet.You may write or draw on this Question Sheet.☞ Use your full, unabbreviated name on the mark-sense form. Do not abbreviate your name.☞ Put the three-digitTest Versionabove into NO. OF QUESTIONSandNO. OF STUDENTS

☞ Fill in the bubbles with pencil only, no pen. Enteryour NAME, Test Version, and answers.☞ Manage your time. Answer questions you know, first. OneAnswer per question.

1. Whatis the output of this command line in an empty directory:touch .a .b .c ; echo [.]*

a. no outputb. .a .b .cc. an error message fromecho saying[.]* does not existd. . .. .a .b . ce. [.]*

2. To bring a background shell job into the foreground, type:a. kill %1b. [Ctrl-Z]c. fgd. bge. [Ctrl-D]

3. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--x-----x 2 pat pgg 60 Jan 1 1:00 foo-r-xrwx-w- 1 bob bg1 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can create a new file in the directoryc. bob can access and write on the filed. bob can list names in the directorye. pat can access and write on the file

4. To change your own account password, use this exact command line:a. $ passwd cst8207b. $ passwd idallen-ubuntuc. $ passwd cst8207.idallen.cad. $ passwd 10.50.254.150e. $ passwd

5. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xrwxrw- 2 pat pgg 60 Jan 1 1:00 foo--w----r-x 1 bob bg1 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. pat can access and write on the filec. pat can rename the filed. bob can access and write on the filee. bob can list names in the directory

6. Whichis the second DOSlogical partition?a. /dev/sd6ab. /dev/sdb1c. /dev/sda6d. /dev/sd2ae. /dev/sda2

Page 2: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

7. Whichcommand line creates a directory into which anyone can put a file, but in which nobody can see the names of thefi les that are there?a. mkdir protected ; chmod 222 protectedb. mkdir protected ; cd protected ; chmod ugo=w .c. mkdir protected ; chmod 333 .d. mkdir protected ; cd protected ; chmod ugo-rw .e. mkdir protected ; chmod 333 protected

8. A Unix/Linux "tarball" is:a. a single compressed file containing one uncompressed fileb. a single-file that contains individual compressed filesc. a multi-file directory containing individual compressed filesd. a multi-file directory containing individual uncompressed filese. a single-file that contains individual uncompressed files

9. Give the GRUB device name for the second partition of the third disk:a. (sd2,3)b. (hd2,1)c. (sdc,2)d. (hd2,3)e. (hd1,2)

10. Whatcommand changes a user’s password?a. passwdb. passwordc. chshd. chpasswde. mkpasswd

11. Thepassword:x: in /etc/passwd means:a. the password is lockedb. the unencrypted password is stored in the group filec. the encrypted password is stored in the shadow filed. the account is lockede. the encrypted password is"x"

12. Pickthe correct order of operations:a. mount, fdisk, mkfsb. fdisk, mount, mkfsc. fdisk, mkfs, mountd. mount, mkfs, fdiske. mkfs, fdisk, mount

13. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr---wx--- 2 pat bg2 60 Jan 1 1:00 foo-rw-rw-r-x 1 pat ted 0 J an 1 1:00 foo/bar

a. bob can rename the fileb. pat can create a new file in the directoryc. bob can list names in the directoryd. bob can access and write on the filee. pat can rename the file

14. Whichof these statements is true?a. If you give me write permission on a file owned by you, I can then usechmod to change its permissions.b. To make a hard link to file "foo " named "bar ", file "foo " must exist.c. You only need "r-- " permission on directory "foo " for "ls -l foo " to work.d. You can make a hard link to a directory.e. The "ln " command takes two arguments, so the maximum number of hard links a file can have is two.

Page 3: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

15. Whatcommand sets group administrator users?a. modgroupb. usermodc. groupeditd. passwde. gpasswd

16. Whichcommand line would show the inode number of a file?a. find -i fileb. cat -l filec. ls -i filed. ls -l filee. cat -i file

17. Whatis contained in the/etc/fstab fi le?a. a list of file systems to mount when booting the systemb. a list of file system tables used to identify partition typesc. a list of file system tables used by the adduser commandd. a list of currently mounted file systemse. a list of file system tables used by the usermod command

18. Whatcommand line modifies and moves (in one command line) the home directoryfoo to bar for the existing userbob?a. usermod -m -d /home/foo /home/barb. usermod -dm /home/bar bobc. usermod -d -m /home/bob bard. usermod -d -m /home/bar bobe. usermod -m -d /home/bar bob

19. Inan empty directory, what is output on your screen by:mkdir -p a/b/c 1/2/3 ; mv a/b 1/2 ; find . -name c

a. ./1/a/bb. ./1/2/a/bc. ./1/2/b/cd. ./1/2/ce. ./a/b/c

20. Whengoing from Run Level 2 to Run Level 5, the system:a. goes directly to Run Level 5b. initializes to Run Level 1, then goes to Level 5c. initializes to Run Level 0, then goes to Level 5d. goes through Run Levels 2, 3, and 4 before Level 5e. goes through Run Levels 3 and 4 before Level 5

21. Ona disk with eight partitions, give the correct partition names after you delete partitionsda2 :a. sda1 sda2 sda3 sda4 sda5 sda6 sda7b. sda1 sda2 sda3 sda4 sda5 sda7 sda8c. sda1 sda2 sda3 sda4 sda6 sda7 sda8d. sda1 sda2 sda3 sda4 sda5 sda6e. sda1 sda3 sda4 sda5 sda6 sda7 sda8

22. The-v option to thegrep command does what?a. selects lines that do not contain unprintable charactersb. turns on the translation of unprintable charactersc. turns off the translation of unprintable charactersd. selects lines that do not contain a match for the supplied patterne. prints the version number of the grep command

Page 4: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

23. To list your personal crontab, type:a. cat crontabb. /etc/crontabc. /var/log/crontabd. atqe. crontab -l

24. Ona disk with eight partitions, give the correct partition names after you delete partitionsda5 :a. sda1 sda2 sda3 sda4 sda5 sda6 sda8b. sda1 sda2 sda3 sda4 sda5 sda7 sda8c. sda1 sda2 sda3 sda4 sda5 sda6 sda7d. sda1 sda2 sda3 sda4 sda6 sda7 sda8e. sda1 sda2 sda3 sda4 sda5 sda6

25. If userpat runs this command, who owns the new files foo andbar : $ s udo touch foo >bar

a. pat androotb. pat andpatc. foo andbard. root andpate. root androot

26. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-x----wx 2 pat ted 60 Jan 1 1:00 foo-r-xr-xrwx 1 pat bg1 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. bob can access and write on the filec. pat can access and write on the filed. bob can create a new file in the directorye. pat can rename the file

27. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--xr----x 2 bob ted 60 Jan 1 1:00 foo-r-x-w-rwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. bob can access and write on the fileb. bob can list names in the directoryc. pat can access and write on the filed. pat can rename the filee. bob can create a new file in the directory

28. Whatcommand will show the type of file system inside an unmountedpartition ?

a. fdisk -s partitionb. mount | grep ' partition'c. fdisk -l partitiond. file partitione. file -s partition

29. Whatcommand line would create a file system on the partition?a. mount partitionb. mkswap partitionc. fsck partitiond. fdisk partitione. mkfs partition

30. Given the following, can userbird in groupsesame append to./foo ?dr-xr-xr-x 2 root sesame 4096 Oct 7 14:00 .-r-xrwxrwx 1 bird sesame 123 Oct 4 14:05 foo

a. No, becausebird has no write permission on the directoryb. No, because the directory is not accessible tobirdc. Yes; permissions don’t apply becausebird ownsfood. No, becausebird has no write permissions onfooe. No, because execute permissions are not set forbird on foo

Page 5: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

31. Whatcommand displays the kernel ring buffer of log messages:a. psmineb. ps lxwwc. dmesgd. crontabe. showall

32. Whichcommand line below does not show any lines from inside the filebat ?a. more batb. ls batc. tail batd. head bate. less bat

33. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-w---xr-x 2 pat ted 60 Jan 1 1:00 foo-rwxr-xrwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. pat can access and write on the fileb. bob can rename the filec. bob can list names in the directoryd. bob can create a new file in the directorye. bob can access and write on the file

34. Given the following, can userbird in groupsesame append to./foo ?dr-xr--r-x 2 root sesame 4096 Oct 7 14:00 .-rw-rw-r-- 1 bird sesame 123 Oct 4 14:05 foo

a. No, becausebird has no write permission on the directoryb. No, because execute permissions are not set forbird on fooc. Yes, becausebird has write permissions onfood. No, because the directory is not accessible tobirde. Yes; permissions don’t apply becausebird ownsfoo

35. Given the following, can userbird in groupsesame append tofoobar ?drwx--xrwx 2 root sesame 4096 Oct 7 14:00 .-rw------- 1 bird sesame 1024 Oct 4 14:05 foobar

a. No, because the directory is not accessible tobirdb. Yes, becausebird has write permissions onfoobarc. No, because execute permissions are not set forbird on foobard. Yes, becausebird ownsfoobare. No, becausesesame has no write permissions onfoobar

36. Whatcommand powers down the machine safely?a. chkconfigb. gpasswdc. shutdownd. passwde. fdisk

37. Whatdoes the-v option to thegrep command do?a. selects lines that do not contain unprintable charactersb. selects lines that do not contain a match for the supplied patternc. turns on the translation of unprintable charactersd. turns off the translation of unprintable characterse. prints the version number of the grep command

38. Whichcommand line displays all the non-hidden names in the current directory that contain the case-insensitive wordhi (and no other names)?a. echo ?[HhIi]?b. echo *(H,h,I,i)*c. echo *[hiHI]*d. echo ?[HhIiHhIi]?e. echo *[Hh][Ii]*

Page 6: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

39. If I mount one file system on directory/a and another file system on directory/b, how can I link the existing file/a/foo to the new pathname/b/new ?a. ln -s /b/new /a/foob. ln /a/new /b/fooc. ln /a/foo /b/newd. ln -s /a/foo /b/newe. ln /b/new /a/foo

40. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-w-rw---x 2 bob ted 60 Jan 1 1:00 foo--w-rwxrwx 1 pat bg1 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. pat can access and write on the filec. bob can create a new file in the directoryd. bob can access and write on the filee. pat can rename the file

41. Inan empty directory, what is output on your screen by:mkdir -p a/b/c 1/2/3 ; mv a 1/2 ; find . -name c

a. ./1/2/3/a/b/cb. ./1/2/a/b/cc. ./1/2/3/a/bd. ./1/ae. ./1/2/a

42. WhichLinux device is the third partition of the first disk?a. /dev/sd31b. /dev/sd1cc. /dev/sd3ad. /dev/sdc1e. /dev/sda3

43. Ina directory containing one file nameddog , what is the output on your screen after this command line:1>/dev/null ls *

a. ls: *: No such file or directoryb. dogc. bash: 1>/dev/null: command not foundd. no outpute. *

44. WhatGRUB internal command will set a partition prefix that will prefix all file names typed without partition prefixes,e,g. /grub/menu.lst ?a. root=(hd0,0)b. root (hd0,0)c. title (hd0,0)d. kernel (hd0,0)e. default=(hd0,0)

45. Whichcommand mounts a device partition on directorydir?a. mount -t ext3 /mnt/sda1 dirb. mount dir /dev/sda1c. mount -t ext2 dir /dev/sda1d. mount /mnt/sda1 dire. mount /dev/sda1 dir

46. Given my directorydir and my filedir/bar owned by me, which permissions allow me to access and change orcreate new content (data) in the filedir/bar but not delete the file?a. Permissions500 on directorydir and200 on file dir/bar .b. Permissions500 on directorydir and100 on file dir/bar .c. Permissions600 on directorydir and700 on file dir/bar .d. Permissions400 on directorydir and400 on file dir/bar .e. Permissions200 on directorydir and200 on file dir/bar .

Page 7: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

47. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wxr-xrw- 2 bob pgg 60 Jan 1 1:00 foo-r-xrwxr-x 1 bob bg1 0 J an 1 1:00 foo/bar

a. pat can access and write on the fileb. bob can list names in the directoryc. pat can rename the filed. bob can create a new file in the directorye. bob can access and write on the file

48. To shut down your Linux system in an orderly fashion:a. logout from each terminal and the machine will shut downb. type the three key [CONTROL]-[ALT]-[F1]c. type the three key [CONTROL]-[ALT]-[DEL]d. runshutdown -h nowe. select VMware "VM|Power Off this virtual machine"

49. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .drw------x 2 pat ted 60 Jan 1 1:00 foo--w--w-r-x 1 pat bg1 0 J an 1 1:00 foo/bar

a. bob can rename the fileb. pat can access and write on the filec. bob can list names in the directoryd. bob can access and write on the filee. bob can create a new file in the directory

50. Whatcommand terminates processes based on their name (not safe!):a. crontabb. killc. ps lxwwd. killalle. dmesg

51. Given the following, can userbird in groupsesame append tofoobar ?drwxrw-rwx 2 root sesame 4096 Oct 7 14:00 .-rw-rw-r-- 1 bird sesame 1024 Oct 4 14:05 foobar

a. Yes, becausebird ownsfoobarb. Yes, becausebird has write permissions onfoobarc. Yes, becausesesame has write permissions onfoobard. No, because execute permissions are not set forbird on foobare. No, because the directory is not accessible tobird

52. Given this successful command line (note the dot argument):cd /tmp ; mkdir dir ; cd dir ; chmod u-x .

Which next command will execute without any "permission denied" errors?a. ls .b. ls /tmp/dir/.c. ls /tmp/dird. ls ..e. ls /tmp/dir/..

53. Given the following, can userbird in groupsesame rename./foo to bar ?d----wx--- 2 root sesame 4096 Oct 7 14:00 .---------- 1 bird sesame 123 Oct 4 14:05 foo

a. Yes; permissions don’t apply becausebird ownsfoob. No, becausebird has no permissions onfooc. No, because the directory has no permissions for other usersd. Yes, becausebird ’s group matches the group writable directorye. No, becausebird cannot read the directory

Page 8: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

54. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr--r-x-w- 2 bob pgg 60 Jan 1 1:00 foo-rwxrwxr-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. pat can rename the filec. bob can access and write on the filed. pat can access and write on the filee. bob can list names in the directory

55. Dereferencethe following symlinkbar into its equivalent absolute path:ln -s ../b/../../a/./foo /tmp/a/b/bar

a. /tmp/a/b/barb. /tmp/fooc. /tmp/a/food. /tmp/b/fooe. /tmp/b/bar

56. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-w-rwx-wx 2 bob ted 60 Jan 1 1:00 foo-r-xrwxrwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. bob can access and write on the filec. pat can access and write on the filed. pat can rename the filee. bob can list names in the directory

57. Given my directorydir and my filedir/bar owned by me, which permissions allow me to access and change orcreate new content (data) in the filedir/bar but not delete the file?a. Permissions500 on directorydir and600 on file dir/bar .b. Permissions600 on directorydir and700 on file dir/bar .c. Permissions300 on directorydir and200 on file dir/bar .d. Permissions400 on directorydir and400 on file dir/bar .e. Permissions100 on directorydir and100 on file dir/bar .

58. Give the GRUB device name for the third partition of the fourth disk:a. (hd3,2)b. (sd2,3)c. (hd4,3)d. (sdd,3)e. (hd2,3)

59. Whatcommand creates a new user account?a. groupmodb. passwdc. gpasswdd. makeusere. useradd

60. Dereferencethe following symlinkbar into its equivalent absolute path:ln -s ../b/../b/../../foo /tmp/a/b/bar

a. /tmp/foob. /tmp/a/fooc. /tmp/b/food. /tmp/b/bare. /tmp/a/b/bar

Page 9: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

61. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xrwx-wx 2 pat pgg 60 Jan 1 1:00 foo-r-xrwxr-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. bob can access and write on the fileb. bob can list names in the directoryc. pat can rename the filed. bob can create a new file in the directorye. pat can access and write on the file

62. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-x-wx--x 2 bob ted 60 Jan 1 1:00 foo-r-x-w-r-x 1 bob bg1 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. pat can rename the filec. pat can access and write on the filed. bob can access and write on the filee. bob can list names in the directory

63. If you run this as you, to create two new files: $ s udo touch a >b

a. root owns both new filesb. this command fails due permissionsc. root owns new file a − you own new file bd. you own new file a − root owns new file be. you own both new files

64. Underwhat directory are system configuration files usually stored?a. /grub/boot/b. /etcc. /var/log/d. /log/var/e. /boot/grub

65. Whichfi le contains a list of possible kernels to load and run after POST?a. /boot/grub/grub.confb. /etc/fstabc. /etc/inittabd. /etc/init.de. /load/kernel.conf

66. Given the following, can userbird in groupsesame remove ./foo ?drwxr-xrwx 2 root sesame 4096 Oct 7 14:00 .-rwxrwxrwx 1 bird sesame 123 Oct 4 14:05 foo

a. Yes; permissions don’t apply becausebird ownsfoob. No, because the directory is not accessible tobirdc. Yes, becausebird matches the writable other permissionsd. Yes, becausebird has full permissions onfooe. No, becausebird has no write permission on the directory

67. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xr-x-w- 2 bob pgg 60 Jan 1 1:00 foo-r-xrwxr-x 1 bob bg1 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can create a new file in the directoryc. bob can access and write on the filed. bob can list names in the directorye. pat can access and write on the file

Page 10: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

68. Given my directorydir and my filedir/bar owned by me, which permissions allow me to access and change orcreate new content (data) in the filedir/bar but not delete the file?a. Permissions100 on directorydir and200 on file dir/bar .b. Permissions600 on directorydir and700 on file dir/bar .c. Permissions100 on directorydir and100 on file dir/bar .d. Permissions200 on directorydir and200 on file dir/bar .e. Permissions400 on directorydir and400 on file dir/bar .

69. Whatvalueumask gives a new file permissionsr--r----- ?a. 110b. 447c. 220d. 326e. 440

70. Given my directorydir and my filedir/f owned by me, which permissions allow me to access and change or createnew content (data) in the filedir/f but not delete the file?a. Permissions100 on directorydir and200 on file dir/f .b. Permissions200 on directorydir and200 on file dir/f .c. Permissions600 on directorydir and700 on file dir/f .d. Permissions400 on directorydir and400 on file dir/f .e. Permissions500 on directorydir and100 on file dir/f .

71. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-x-wx--- 2 pat bg1 60 Jan 1 1:00 foo-rwxrwxr-x 1 pat ted 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. bob can access and write on the filec. pat can create a new file in the directoryd. pat can rename the filee. bob can create a new file in the directory

72. Given my directorydir and my filedir/bar owned by me, which permissions allow me to delete the filedir/bar from the directory, but not change the content (data) in the file?a. Permissions300 on directorydir and400 on file dir/bar .b. Permissions100 on directorydir and300 on file dir/bar .c. Permissions300 on directorydir and200 on file dir/bar .d. Permissions500 on directorydir and500 on file dir/bar .e. Permissions100 on directorydir and500 on file dir/bar .

73. Whatvalueumask gives a new directory permissionsrw--w---x ?a. 156b. 211c. 421d. 432e. 621

74. Given my directorydir and my filedir/c owned by me, which permissions allow me to delete the filedir/c fromthe directory, but not change the content (data) in the file?a. Permissions100 on directorydir and100 on file dir/c .b. Permissions300 on directorydir and300 on file dir/c .c. Permissions300 on directorydir and500 on file dir/c .d. Permissions100 on directorydir and200 on file dir/c .e. Permissions500 on directorydir and400 on file dir/c .

75. Whichof these is a likely kernel version number?a. #1 SMP Sat Nov 7 21:25:57 EST 2009b. 83 Linuxc. 2.6.31.5-127.fc12.i686.PAEd. 139285e. Linux

Page 11: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

76. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr---wx--x 2 bob ted 60 Jan 1 1:00 foo--w--w-r-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. bob can access and write on the filec. pat can access and write on the filed. bob can create a new file in the directorye. pat can rename the file

77. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--x----w- 2 pat ted 60 Jan 1 1:00 foo--w-r-xrwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. pat can rename the filec. pat can access and write on the filed. bob can list names in the directorye. bob can access and write on the file

78. Whena user namedbob runs a command in an executable file owned byfoo , in a directory owned byroot , the fileexecutes with the permissions of:a. root and bobb. rootc. bobd. fooe. root and foo

79. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--xrwx--x 2 bob ted 60 Jan 1 1:00 foo----rw--w- 1 bob bg1 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. bob can access and write on the filec. pat can access and write on the filed. pat can rename the filee. bob can list names in the directory

80. Whena user namedbob runs a command in asetuidexecutable file owned byfoo , in a directory owned byroot ,the file executes with the permissions of:a. foob. rootc. bobd. root and bobe. root and foo

81. Whatpermissions are given to newdir after this command line:umask 156 ; mkdir newdir

a. rw--w----b. r-x--x---c. r-x-w-rw-d. --xr-xrw-e. rw--w---x

82. Pickthe correct order of operations:a. MBR, POST, BIOS, O/S bootb. BIOS, POST, MBR, O/S bootc. BIOS, MBR, POST, O/S bootd. POST, MBR, BIOS, O/S boote. POST, BIOS, MBR, O/S boot

Page 12: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

83. Given userfoo in groupfoo and userbar in groupbar , which command line enables a file to be read by bothfooandbar :a. chown foo file ; chown bar file ; chmod 440 fileb. chown bar file ; chown foo file ; chmod 333 filec. chown foo:bar file ; chmod 077 filed. chown foo:foo file ; chmod bar:bar filee. chown foo:bar file ; chmod 440 file

84. Inan empty directory, what is output on your screen by:mkdir -p a/b/c 1/2/3 ; mv a/b 1/2/3 ; find . -name c

a. ./1/2/3/b/cb. ./a/b/cc. ./1/2/3/a/bd. ./1/2/a/be. ./1/2/3/c

85. Theminimum permissions you need to copy a file foo from directorya to directoryb are:a. rx ona, wx onb, won foob. x ona, wx onb, r on fooc. wx ona, wx onb, none onfood. rwx ona, wx onb, none onfooe. wx ona, wx onb, rw on foo

86. Theminimum permissions you need to append to a filefoo in directorya are:a. wx ona, won foob. rwx ona, rw on fooc. wx ona, none onfood. x ona, won fooe. rwx ona, none onfoo

87. Canthree different files have the same inode number on three different file systems?a. yes: inode numbers are only unique inside a file systemb. no: inode numbers are unique across all file systemsc. yes: if the files are all names for the same inoded. no: inode numbers only apply to directories, not filese. no: you can’t hav einode numbers on three file systems

88. Inan empty directory, what is output on your screen by:mkdir -p a/b/c 1/2/3 ; mv a/b/c 1/2 ; find . -name c

a. ./1/2/a/b/cb. ./1/2/3/a/b/cc. ./1/a/b/cd. ./1/2/b/ce. ./1/2/c

89. Given my directorydir and my filedir/f owned by me, which permissions allow me to delete the filedir/f fromthe directory, but not change the content (data) in the file?a. Permissions300 on directorydir and500 on file dir/f .b. Permissions700 on directorydir and200 on file dir/f .c. Permissions600 on directorydir and300 on file dir/f .d. Permissions500 on directorydir and500 on file dir/f .e. Permissions600 on directorydir and500 on file dir/f .

90. Given the following, can userbird in groupsesame copy./foo to bar ?drwx-wx--x 2 root sesame 4096 Oct 7 14:00 .--wxrwxrwx 1 bird sesame 123 Oct 4 14:05 foo

a. Yes; permissions don’t apply becausebird ownsfoob. Yes, becausebird has write permissions onfooc. No, because the directory is not readable bybirdd. No, because the directory has no write permissions forbirde. No, becausefoo has no read permissions forbird

Page 13: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

91. Whatvalueumask gives a new file permissionsr--r----- ?a. 237b. 446c. 220d. 440e. 110

92. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xrwx--x 2 pat pgg 60 Jan 1 1:00 foo--w----r-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can access and write on the filec. bob can list names in the directoryd. pat can access and write on the filee. bob can create a new file in the directory

93. Inan empty directory, what permissions are on file??? after these commands:touch ??? *** ; chmod 111 *chmod 222 ? ; chmod 444 '*'

a. -w--w--w-b. --x--x--xc. rw-rw-rw-d. r--r--r--e. -wx-wx-wx

94. Processsignals in increasing order of strength:a. TERM KILL HUPb. TERM HUP KILLc. KILL HUP TERMd. HUP TERM KILLe. HUP KILL TERM

95. Approximatelyhow big is anfdisk partition size of12345678 blocks?a. 12 GBb. 1.2 GBc. 12 MBd. 1.2 TBe. 12 TB

96. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xr-xrwx 2 pat bg1 60 Jan 1 1:00 foo-rwxrwxr-x 1 pat ted 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. pat can create a new file in the directoryc. pat can rename the filed. bob can access and write on the filee. bob can rename the file

97. Whatvalueumask gives a new file permissionsr--r----- ?a. 446b. 220c. 440d. 110e. 226

98. Whichcommand line creates a directory into which anyone can put a file, but in which nobody can see the names of thefi les that are there?a. mkdir protected ; cd protected ; chmod go-x .b. mkdir protected ; chmod 777 .c. mkdir protected ; chmod 333 protectedd. mkdir protected ; cd protected ; chmod go+wx .e. mkdir protected ; chmod 777 protected

Page 14: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

99. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .drw-r-xrwx 2 pat bg1 60 Jan 1 1:00 foo-rwxrwxr-x 1 pat ted 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. pat can create a new file in the directoryc. bob can access and write on the filed. bob can rename the filee. bob can list names in the directory

100. GRUB boot menu entries are a paragraph of several lines. The keyword on the first line of the paragraph is always:a. timeoutb. titlec. bootd. kernele. initrd

101. Whatcommand modifies existing account information (and possibly home directory)?a. newuserb. usermodc. adduserd. makeusere. passwd

102. Whatvalue tochmod would change the permissions on a file tor-----rw- ?a. 122b. 406c. 322d. 102e. 654

103. Ina directory containing one file nameddog , what is the output on your screen after this command line:2>/dev/null ls nosuchfile

a. bash: 2>/dev/null: command not foundb. nosuchfilec. no outputd. doge. ls: nosuchfile: No such file or directory

104. Whathigh-level command fetches and tracks packages for CentOS?a. tarb. apt-getc. yumd. rpme. wget

105. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wx--x--x 2 bob ted 60 Jan 1 1:00 foo-r-xr-xrwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. pat can access and write on the filec. pat can rename the filed. bob can create a new file in the directorye. bob can access and write on the file

106. WhatGRUB line do you modify to boot a machine single-user?a. grubb. bootc. initrdd. timeoute. kernel

Page 15: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

107. To show all your one-time scheduled commands, type:a. /var/log/crontabb. /etc/crontabc. atqd. cat crontabe. crontab -l

108. Whatcommand displays the groups you are in?a. gpasswdb. groupsc. mkgroupsd. lstgroupse. grouprint

109. Whatcommand runs a file system check on a disk partition:a. mount partitionb. fsck partitionc. fdisk partitiond. chkconfig partitione. mkfs partition

110. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wx-w-rwx 2 pat bg2 60 Jan 1 1:00 foo-rwxrwxrwx 1 pat ted 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can list names in the directoryc. bob can access and write on the filed. bob can create a new file in the directorye. bob can rename the file

111. Pickthe correct order of operations:a. swapon, fdisk, mkswapb. fdisk, mkswap, swaponc. swapon, mkswap, fdiskd. mkswap, fdisk, swapone. fdisk, swapon, mkswap

112. Approximatelyhow big is anfdisk partition size of123456789 blocks?a. 123 TBb. 12.3 GBc. 123 MBd. 123 GBe. 12.3 TB

113. Given my directorydir and my filedir/c owned by me, which permissions allow me to access and change or createnew content (data) in the filedir/c but not delete the file?a. Permissions100 on directorydir and100 on file dir/c .b. Permissions200 on directorydir and200 on file dir/c .c. Permissions600 on directorydir and700 on file dir/c .d. Permissions100 on directorydir and200 on file dir/c .e. Permissions400 on directorydir and400 on file dir/c .

114. Whenyou usechkconfig to enable a service for Run Level 4, the service will:a. be started immediately, if the current Run Level is 4b. be started immediately, no matter what the current Run Levelc. be enabled for Run Level 4 but will not be startedd. be started immediately, if the current Run Level is 4 or lesse. be stopped, then started, if the current Run Level is 4

Page 16: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

115. Whichis the Linux fifth disk device?a. /dev/sdeb. /dev/sda5c. /dev/s5ad. /dev/sd5e. /dev/sd5a

116. Theminimum permissions you need to delete a filefoo from directorya are:a. wx ona, r on foob. wx ona, won fooc. rwx ona, none onfood. wx ona, none onfooe. rwx ona, rw on foo

117. Namethree types of partitions:a. primary, enhanced, logicalb. primary, enhanced, linearc. primary, extended, logicald. basic, extended, logicale. primary, extended, linear

118. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wxrwx-w- 2 pat ted 60 Jan 1 1:00 foo-r-xr-xrwx 1 pat bg1 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. bob can create a new file in the directoryc. bob can access and write on the filed. pat can access and write on the filee. pat can rename the file

119. Given my directorydir and my filedir/bar owned by me, which permissions allow me to delete the filedir/bar from the directory, but not change the content (data) in the file?a. Permissions700 on directorydir and500 on file dir/bar .b. Permissions700 on directorydir and200 on file dir/bar .c. Permissions500 on directorydir and500 on file dir/bar .d. Permissions600 on directorydir and300 on file dir/bar .e. Permissions600 on directorydir and500 on file dir/bar .

120. Whichfi le contains a list of file systems to mount when booting the system?a. /etc/fstabb. /etc/grub.confc. /var/spoold. /var/loge. /etc/init.d

121. Whatvalueumask gives a new file permissionsr--r----- ?a. 220b. 337c. 110d. 446e. 440

122. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .drw-rw-rwx 2 pat bg1 60 Jan 1 1:00 foo-rwxrwxrwx 1 pat ted 0 J an 1 1:00 foo/bar

a. pat can create a new file in the directoryb. pat can rename the filec. bob can access and write on the filed. bob can rename the filee. bob can list names in the directory

Page 17: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

123. Whatcommand creates anext3 fi le system ondevice ?

a. swapon -t ext3 deviceb. fdisk -t ext3 devicec. mkfs -t ext3 deviced. mount -t ext3 devicee. file -t ext3 device

124. Given the following, can userbird in groupsesame copy./foo to bar ?drwxr-xrwx 2 root sesame 4096 Oct 7 14:00 .-r-xr-xr-x 1 bird sesame 123 Oct 4 14:05 foo

a. Yes; permissions don’t apply becausebird ownsfoob. No, because the directory is not accessible tobirdc. No, becausefoo has no write permissions forbirdd. Yes, becausebird has read permissions onfooe. No, because the directory has no write permissions forbird

125. Regarding the-t type option, e.g.-t ext3 :a. you must give the type when usingfdiskb. you must give the type when usingswaponc. you can usually omit the type when usingmkfsd. you must give the type when usingmkswape. you can usually omit the type when usingmount

126. Theminimum permissions you need to link a filefoo from directorya to directoryb are:a. wx ona, wx onb, r on foob. rwx ona, wx onb, none onfooc. x ona, wx onb, none onfood. rwx ona, wx onb, rw on fooe. wx ona, wx onb, won foo

127. Whichcrontab line executes at13:54 ev ery day?a. 54 13 * * * commandb. 13 * * * 54 commandc. 13 54 * * * commandd. * * * 13 54 c ommande. * * * 54 13 c ommand

128. Whichcommand line below does not show any lines from inside the fileout ?a. sort outb. head outc. more outd. tail oute. wc out

129. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d---rwx--x 2 pat pgg 60 Jan 1 1:00 foo--w----rwx 1 bob bg1 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. bob can access and write on the filec. bob can list names in the directoryd. pat can access and write on the filee. pat can rename the file

130. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xrw-rwx 2 pat bg1 60 Jan 1 1:00 foo-rwxrwxrwx 1 pat ted 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. pat can create a new file in the directoryc. bob can rename the filed. bob can access and write on the filee. bob can list names in the directory

Page 18: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

131. Theminimum permissions you need to read a filefoo in directorya are:a. x ona, r on foob. wx ona, won fooc. rwx ona, rw on food. rwx ona, none onfooe. wx ona, none onfoo

132. Whatcommand connects a file system in a partition to a directory:a. mount partition directoryb. mkfs partition directoryc. fdisk partition directoryd. fsck partition directorye. file partition directory

133. Whatcommand line shows only your own processes, not all processes?a. psmineb. ps lxwwc. showalld. crontabe. dmesg

134. Whichof these commands makes a file owned by me, also readable by me?a. umask 300 ./myfileb. chmod r=u ./myfilec. umask 400 myfiled. chmod r+u myfilee. chmod u+r ./myfile

135. Whichof these statements is true?a. you can only remove a file name if the file is writable by youb. you may be able to rename a file even if you do not own the filec. you can change the permissions of any file to which you can writed. you can only make links to files owned by youe. you can only remove a file name if the file is owned by you

136. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wx---rw- 2 bob ted 60 Jan 1 1:00 foo----rwxrwx 1 bob bg2 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. pat can access and write on the filec. bob can access and write on the filed. bob can list names in the directorye. bob can create a new file in the directory

137. Whatvalue tochmod would change the permissions on a file torw-r--r-- ?a. 244b. 311c. 644d. 211e. 344

138. Whichcommand removes adjacent duplicate lines from a file?a. duplb. uniquec. dupd. duplicatee. uniq

Page 19: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

139. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-w---xr-- 2 pat ted 60 Jan 1 1:00 foo-rwxrwxrwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. bob can create a new file in the directoryb. pat can access and write on the filec. bob can list names in the directoryd. bob can access and write on the filee. bob can rename the file

140. WhatGRUB command will display the partitions on a disk?a. mount (hd0)b. geometry (hd0)c. fdisk (hd0)d. ls (hd0)e. cat (hd0)

141. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--x--xrw- 2 bob pgg 60 Jan 1 1:00 foo-r-xrwx-w- 1 bob bg2 0 J an 1 1:00 foo/bar

a. bob can access and write on the fileb. pat can access and write on the filec. pat can rename the filed. bob can list names in the directorye. bob can create a new file in the directory

142. Whenyou show the type of file system inside an unmounted partition, what is displayed for a new, empty partition?a. vfat fi le systemb. ext2 fi le system (the default)c. ext3 fi le systemd. datae. ntfs fi le system

143. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--xr-x-w- 2 bob pgg 60 Jan 1 1:00 foo--w----r-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can access and write on the filec. pat can access and write on the filed. bob can list names in the directorye. bob can create a new file in the directory

144. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--x-wx--- 2 bob pgg 60 Jan 1 1:00 foo-r-x-w-r-x 1 bob bg1 0 J an 1 1:00 foo/bar

a. pat can access and write on the fileb. bob can create a new file in the directoryc. bob can list names in the directoryd. bob can access and write on the filee. pat can rename the file

145. If I mountsda1 on /one andsda2 on /two, how can I link the existing file/one/foo to the new pathname/two/bar ?a. ln /two/bar /one/foob. ln /one/foo /two/barc. ln -s /one/foo /two/bard. ln -s /two/bar /one/fooe. ln /one/bar /two/foo

Page 20: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

146. If the current directory contains 10 visible files and 5 visible sub-directories, what is the output on your screen of thiscommand: ls -d */.

a. 5 directory namesb. an error message because*/. does not existc. no outputd. 15 pathnamese. */.

147. WhichGRUB command line displays the contents of the filefoo ?a. mount (hd0,0)/foob. ls (hd0,0)/fooc. cat (hd0,0)/food. type (hd0,0)/fooe. p ( hd0,0)/foo

148. Whichcommand usually goes in your.bash_profile fi le?a. source ./.bashrcb. ./.bash_profile sourcec. ./.bashrc sourced. source ./.bash_profilee. cat ./.bashrc

149. Thesignal sent to a foreground process by typing the[Ctrl-C] key is:a. SIGINTb. SIGKILLc. SIGTERMd. SIGSTOPe. SIGHUP

150. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--xrwx-wx 2 bob ted 60 Jan 1 1:00 foo-r-x-w-r-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. bob can create a new file in the directoryc. bob can access and write on the filed. pat can access and write on the filee. pat can rename the file

151. Whatcommand shows all partition names and System IDs (types) on a disk:a. fdisk -l diskb. find -l diskc. mount -l diskd. mkfs -l diske. fsck -l disk

152. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wx-w-rwx 2 pat bg1 60 Jan 1 1:00 foo-rwxrwxrwx 1 pat ted 0 J an 1 1:00 foo/bar

a. bob can rename the fileb. bob can create a new file in the directoryc. bob can access and write on the filed. pat can create a new file in the directorye. bob can list names in the directory

153. Inan empty directory, what permissions are on file??? after these commands:touch ??? *** ; chmod 111 *chmod 222 ??? ; chmod 444 '***'

a. --x--x--xb. -wx-wx-wxc. r--r--r--d. rw-rw-rw-e. -w--w--w-

Page 21: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

154. Whichcommand counts the number of Unix permission groups you are in?a. umask | wcb. wc groupsc. groups | wcd. echo groups | wce. id | wc

155. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-x-wx--x 2 bob ted 60 Jan 1 1:00 foo-r-xr-xrwx 1 pat bg1 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can access and write on the filec. bob can create a new file in the directoryd. pat can access and write on the filee. bob can list names in the directory

156. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d--xr----x 2 bob ted 60 Jan 1 1:00 foo--w--w-r-x 1 bob bg1 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can access and write on the filec. bob can create a new file in the directoryd. bob can list names in the directorye. pat can access and write on the file

157. Approximatelyhow big is anfdisk partition size of123456 blocks?a. 123 GBb. 123 KBc. 12.3 GBd. 12.3 MBe. 123 MB

158. Underwhat directory are system log files usually stored?a. /grub/bootb. /var/logc. /boot/grubd. /etc/loge. /log/var

159. Whatminimal permissions must you have on a directory to be able to execute successfully the commandls . frominside the directory?a. rw-b. -wxc. r--d. r-xe. --x

160. Given this successful command line (note the dot argument):cd /home/foo ; mkdir bar ; cd bar ; chmod a-x .

Which of the following subsequent commands will execute without any "permission denied" errors?a. ls /home/foo/bar/..b. ls /home/foo/bar/.c. ls .d. ls /home/foo/bare. ls ..

161. Theminimum permissions you need to move a file foo from directorya to directoryb are:a. rwx ona, wx onb, rw on foob. wx ona, wx onb, won fooc. rwx ona, wx onb, none onfood. wx ona, wx onb, r on fooe. wx ona, wx onb, none onfoo

Page 22: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

162. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .drw---x--- 2 pat bg2 60 Jan 1 1:00 foo-r------w- 1 pat ted 0 J an 1 1:00 foo/bar

a. bob can access and write on the fileb. pat can rename the filec. bob can rename the filed. bob can list names in the directorye. pat can create a new file in the directory

163. Whena personalcrontab job runs, the current working directory is set to:a. the current directory that was in use when thecrontab job was createdb. the directory with the name/rootc. the HOME directory of the user who created the jobd. the system ROOT directorye. the directory with the name/home

164. Given my directorydir and my filedir/bar owned by me, which permissions allow me to delete the filedir/bar from the directory, but not change the content (data) in the file?a. Permissions300 on directorydir and500 on file dir/bar .b. Permissions300 on directorydir and300 on file dir/bar .c. Permissions500 on directorydir and400 on file dir/bar .d. Permissions100 on directorydir and200 on file dir/bar .e. Permissions100 on directorydir and100 on file dir/bar .

165. If you usels -l on a file owned by a deleted user, the user/owner field is:a. the name"removed"b. a number instead of an account namec. the name"deleted"d. an account name in parentheses, e.g.(luke)e. the number zero

166. Given a sector size of 512 bytes, approximately how many meg abytes are unused before the start of a partition thatbegins on sector 4096?a. 20b. 1c. 2d. 10e. 4

167. Given my directorydir and my filedir/foo owned by me, which permissions allow me to access and change orcreate new content (data) in the filedir/foo but not delete the file?a. Permissions600 on directorydir and700 on file dir/foo .b. Permissions500 on directorydir and600 on file dir/foo .c. Permissions100 on directorydir and100 on file dir/foo .d. Permissions400 on directorydir and400 on file dir/foo .e. Permissions300 on directorydir and200 on file dir/foo .

168. Dereferencethe following symlinkbar into its equivalent absolute path:ln -s ../b/../../a/../foo /tmp/a/b/bar

a. /tmp/a/b/barb. /tmp/b/barc. /tmp/b/food. /tmp/a/fooe. /tmp/foo

169. Whenanat job runs, the current working directory is set to:a. the HOME directory of the user who created the jobb. the directory with the name/homec. the current directory that was in use when theat job was createdd. the system ROOT directorye. the directory with the name/root

Page 23: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

170. Otherthanroot , who can change the permissions of the following directory?dr-xrwxrwx 17 foo bar 4096 Apr 15 16:40 .

a. only userfoob. anyone except userfooc. userfoo and any user in groupbard. only users in groupbare. only root can change the permissions

171. Given the following, can userbird in groupsesame 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

a. Yes; permissions don’t apply becausebird ownsfoob. Yes, becausebird has write permissions onfooc. No, because the directory is not accessible tobirdd. No, becausefoo has no read permissions forbirde. No, because the directory has no write permissions for others

172. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr-xrwx-wx 2 pat ted 60 Jan 1 1:00 foo-r-xr-xrwx 1 pat bg2 0 J an 1 1:00 foo/bar

a. bob can list names in the directoryb. pat can access and write on the filec. pat can create a new file in the directoryd. bob can access and write on the filee. bob can rename the file

173. Theshadow password file is used:a. to store secondary passwords for times when you forget your main oneb. to hide encrypted passwords from viewing by ordinary usersc. to reduce the size of the main password file for faster accessd. to allow passwords to exist on partitions other than the ROOTe. to keep a back-up of the main password file in case of corruption

174. To change the group of a file tome, type:a. chown me fileb. chown :me filec. umask :me filed. newuser file mee. newuser me file

175. Whichis the best choice for an extended partition size that will hold exactly three 100MB logical partitions?a. 100MBb. 300MBc. 400MBd. 290MBe. 320MB

176. Given the following, can userbird in groupsesame append to./foo ?dr-xr-xr-x 2 root sesame 4096 Oct 7 14:00 .-rw-r-xr-x 1 bird sesame 123 Oct 4 14:05 foo

a. No, becausebird has no write permission on the directoryb. No, because execute permissions are not set forbird on fooc. Yes, becausebird has write permissions onfood. No, because the directory is not accessible tobirde. Yes; permissions don’t apply becausebird ownsfoo

177. Whenyou use theservice command tostart a service that is not currently running, the service will:a. be enabled for that Run Level, but will not be startedb. start immediately, no matter what the current Run Levelc. be enabled for the current Run Level, and will then be startedd. be enabled, and will start if valid for the current Run Levele. be queued for a later start when changing Run Levels

Page 24: PRINT Name - Ian! D. Allenteaching.idallen.com/cst8207/15w/notes/practicetest3singlepage.pdf · PRINT Name: Test Version: 389 ... Userbobis in groups bg1and bg2.User patis in group

178. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .dr---wx--x 2 bob ted 60 Jan 1 1:00 foo-r-xrwxrwx 1 pat bg1 0 J an 1 1:00 foo/bar

a. pat can rename the fileb. bob can create a new file in the directoryc. pat can access and write on the filed. bob can access and write on the filee. bob can list names in the directory

179. Whatpermissions are given to newfile after this command line:umask 326 ; touch newfile

a. -wxr-----b. r--r-x--xc. -wx-w-r-xd. -wx-w-rw-e. r--r-----

180. Thedifference between the system (root ) crontab and all the user (personal) crontabs is:a. the system crontab has the date and time in itb. the personal crontab also has the userid in itc. the personal crontab only runs commands onced. the system crontab also has the userid in ite. the personal crontab has the date and time in it

181. Whatcommand manipulates your personal list of repeated scheduled commands:a. crontabb. showallc. dmesgd. psminee. ps lxww

182. Give the GRUB device name for the fourth partition of the third disk:a. (hd2,3)b. (hd4,3)c. (sdd,3)d. (hd3,2)e. (sd2,3)

183. Userbob is in groupsbg1 andbg2 . Userpat is in grouppgg .d-wx----w- 2 pat pgg 60 Jan 1 1:00 foo-rwxrwxr-x 1 bob bg2 0 J an 1 1:00 foo/bar

a. pat can access and write on the fileb. bob can create a new file in the directoryc. bob can access and write on the filed. pat can rename the filee. bob can list names in the directory