76.

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); }

Book: LPI Linux Certification in a Nutshell
Section: Chapter 9.  Exam 101 Practice Test



9.2 Answers

  1. c. Section 8 holds administrative commands such as fsck and mkfs.

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

  3. 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.

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

  5. 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.

  6. 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.

  7. The man command displays manpages.

  8. 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.

  9. e. /var and /tmp are mainly transient, /usr is typically static, /root is simply a home directory for root, but /etc contains system configuration information that frequently changes.

  10. 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.

  11. 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.

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

  13. b and d. Without user privilege to the file, jdoe cannot see the contents. However, as the file's owner, the mode can be changed to gain access. Everyone in finance is granted permission, but jdoe as the owner is denied.

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

  15. cmd1 | cmd2

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

  17. /etc/group

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

  19. cron.

  20. 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.

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

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

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

  24. 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.

  25. 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.

  26. ln -s

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

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

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

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

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

  32. fdisk

  33. 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.

  34. e. The script has an error and will not produce the expected output. In a for statement, the loop variable does not have the dollar sign. Changing line 2 to for v1 in a1 a2 will correct the error and produce the output in answer B.

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

  36. a. cp should be aliased to the interactive mode with the -i option in .bashrc. .bash_profile normally doesn't include aliases.

  37. d. The nl command numbers lines.

  38. b and e. The users option grants non-privileged users the right to mount and unmount the filesystem. /dev/fd0 is a floppy device.

  39. d. Brackets ([]) are used to group a character set consisting of numbers 1-8 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.

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

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

  42. d. The Linux System Administrators' Guide is a free publication of the Linux Documentation Project (LDP) and is available online at http://www.ibiblio.org/mdw/index.html.

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

  44. PATH.

  45. a. The which command is used to search the directories specified in variable PATH.

  46. c. The runlevel command yields the previous and present runlevels.

  47. b. /etc/syslog.conf is the configuration file for the Syslog daemon syslogd.

  48. d. pr converts text files into paginated, columnar versions.

  49. 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.

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

  51. SUID.

  52. nice.

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

  54. 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.

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

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

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

  58. d. The shutdown -f command configures the filesystem to skip the fsck checking. The -F option forces the check.

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

  60. 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.

 


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

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