Section 9.2. Answers


9.2. Answers

  1. b. Both ps and top yield process status. None of the other listed commands are related to processes.

  2. e. IDE disk drives are referred to as /dev/hdx, where x is a, b, c, or d. Partitions are numbered from 1 through 4 for primary and extended partitions and 5 through 16 for logical partitions.

  3. d. The tail command is used for checking the last lines of a text file. By default, it displays 10 lines.

  4. a. The !! command history expansion executes the previous command. Entering the Ctrl-P keystroke uses the Emacs key-binding bash to move up one line in the history; pressing Enter executes that command.

  5. b, c, and d. fsck is a frontend for the programs that actually do the checking. e2fsck and fsck.ext2 are links to the program that checks native Linux ext2 filesystems.

  6. c. df reports disk information, including a percentage of the filesystems used. Answer a is incorrect because /home may not be the only partition on the physical disk.

  7. e. /var and /tmp are mainly transient, /usr is typically static (and should be easy to reinstall from the original OS media), /root is simply a home directory for root, but /etc contains system configuration information that frequently changes.

  8. d. split -n outfile separates a file into multiple output files, each with n lines, and names them outfileaa, outfileab, and so on. Since the original file had 12 lines and Carolyn split it into sets of 4 lines, the result is three files named glaa, glab, and glac, each containing 4 lines.

  9. c. CD-ROMs use the iso9660 filesystem, which is the default for mount, but also indicated using -t. Without the assistance of an entry in /etc/fstab, both the mount device (/dev/cdrom) and the mount point (/mnt/cdrom) must be provided.

  10. b. The write will continue until the hard limit of 110 MB is reached, after which the write fails and data is lost.

  11. b and c. find and locate do not search the contents of files. /etc/passwd is not a script.

  12. cmd1 | cmd2

  13. a. The variable must be set and exported. The semicolon separates the two commands.

  14. a and c. /etc, /lib, /bin, /sbin, and /dev must be in the / filesystem.

  15. d. The first echo argument is unquoted and thus returns its contents, ls. The second is quoted with double quotes, which do not preserve the $, so it too returns ls. The third is quoted with single quotes, which do preserve the $, so it returns the string $MYVAR. The last argument is backquoted, which means that it returns the result of the command stored in $MYVAR. The command is ls, which displays the only file in the directory, Afile1.

  16. e. Using the & character puts a program in the background.

  17. d. The tr program translates characters from one group into another, including case.

  18. b. init, the grandfather of all processes, always has PID 1.

  19. c. The g indicates that we're operating on the group privilege, and the +s indicates that we should add the "set id" bit, which means that the SGID property will be applied.

  20. a. User mode 7 is the same as u=rwx, group mode 5 is the same as g=rx, and other mode 4 is the same as o=r. The ~/ syntax implies the user's home directory.

  21. ln -s

  22. c. The octal dump program, when used with the -t x option, will output in hexadecimal notation.

  23. d. The -p, or preserve, option is required to retain dates.

  24. d. The [Ll] matches both letters.

  25. a. kill -9 is drastic but necessary for processes unable to respond to other signals.

  26. e. Ctrl-Z stops the job and gives control back to the terminal. bg places the job into the background and restarts it.

  27. fdisk.

  28. b. By default, files do not have the execute privilege, which rules out all responses containing odd numbers in the mode. They also do not by default have the sticky bit set, which eliminates response e. Response b is the result of masking initial bits 666 with umask 027, leaving 640, which is the same as 0640.

  29. c. tar should be used with the extraction option x and a tape device, such as SCSI tape /dev/st0.

  30. a or b. cp should be aliased to the interactive mode with the -i option in .bashrc. .bash_profile normally doesn't include aliases, but it will also work.

  31. d. The nl command numbers lines.

  32. b and e. The users option grants nonprivileged users the right to mount and unmount the filesystem. /dev/fd0 is a floppy device.

  33. d. Brackets ([ ]) are used to group a character set consisting of numbers 18 and characters A-Z and a-z. The ^ just inside the opening bracket negates the whole string, such that the string matches numbers 0, 9, and symbols.

  34. d. The shadow password system has been implemented, placing all passwords in /etc/shadow as denoted by the x following the username.

  35. init 5. telinit 5 would also work, as they are both links to the same file.

  36. c. The sticky bit in the mode prevents deletion by non-owners, but root can still delete the file.

  37. c. Since Dave is using a modular kernel, the network driver 3c509.o is a kernel module. LILO can send kernel parameters but not module parameters. These are stored in /etc/conf.modules.

  38. c. While answers b and d are technically correct, answer c best describes /sbin.

  39. SUID.

  40. nice.

  41. a. cat concatenates files, and as a subset, will list one or more files to standard output. tac lists files in reverse order.

  42. b. A metacharacter is a special character that is used to modify and control the interpretation of literals. File globbing is generally considered distinct but very similar to the use of regular expressions.

  43. d. PCs usually have two IDE interfaces, each capable of handling two devices.

  44. e. A filesystem without free inodes cannot create new objects until existing objects are removed.

  45. c. This is an example line from the output of df -h, the "human-readable" mode of df.

  46. a. LILO can start the Windows NT boot loader and many other operating systems.

  47. b. The > character opens and writes to a new file, while >> appends to an existing file, unless that file doesn't exist, in which case it is opened first.

  48. e. The --purge option is a variant of -r, remove.

  49. c. The directive indicates that a font server should listen on its default port.

  50. a. The appropriate option is either -s or --status.

  51. d. A window manager is a client, controlled by the X server. Answers a and b are incorrect because they imply that the X server originates the graphical output. Answers c and e are common misconceptions.

  52. 3 and 4.

  53. b. The query mode is required, which implies -q. The -a option in query mode yields all packages.

  54. e.

  55. c. Provided that file is an RPM file, the -U indicates that an upgrade should occur. -h turns on hash marks.

  56. d. Linux has no control over the BIOS settings.

  57. d. Xsession is the system-wide default application startup file.

  58. a and b. Both the second stage of LILO and the kernel should be kept within the 1024-cylinder boundary.

  59. c.

  60. d. X terminals use XDMCP to attach to xdm daemons.

  61. b. An 8-bit SCSI bus has three address lines, thus providing 23 or 8 addresses. Setting aside one for the controller, there are 7 addresses for devices.

  62. a. startx is included with XFree86 as a suggestion, and customization is encouraged.

  63. d. rpm -qlp queries and lists files in the package.

  64. c. The system, xdisp, will display programs on the second display of its X server.

  65. e.

  66. d.

  67. e. :bye is not a valid command in vi.

  68. b. Options -i (install) and -L (list installed files) are incompatible and don't make sense together.

  69. a. ld.so.conf is the text file in which you add library directories. ld.so.cache is the binary index resulting from ldconfig.



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net