Section 9.1. Questions


9.1. Questions

  1. What two commands display the status of processes on a Linux system?

    1. ls and df

    2. ps and top

    3. ps and df

    4. df and top

    5. du and df

  2. What does the device file /dev/hdb6 represent?

    1. An extended partition on a SCSI disk drive

    2. A logical partition on a SCSI disk drive

    3. An extended partition on an IDE disk drive

    4. A primary partition on an IDE disk drive

    5. A logical partition on an IDE disk drive

  3. Which command will display the last lines of the text file file1?

    1. head -b file1

    2. head --bottom file1

    3. head -v file1

    4. tail file1

    5. tail -n 1 file1

  4. In the Bash shell, entering !! has the same effect as which one of the following?

    1. Ctrl-P and Enter

    2. Ctrl-N and Enter

    3. Ctrl-U and Enter

    4. !-2

    5. !2

  5. Which of the following commands can be used to check an ext2 filesystem? Select three that apply.

    1. fsck -ext2 /dev/hda5

    2. fsck /dev/hda5

    3. e2fsck /dev/hda5

    4. fsck.ext2 /dev/hda5

    5. fsck.linux /dev/hda5

  6. In response to the df command, the system reports a Use% of 98% for the filesystem mounted on /home. Which one of the following best describes the significance of this information?

    1. Files on /home are consuming 98% of the physical disk.

    2. File read/write activity on /home is consuming 98% of system I/O capacity.

    3. Files on /home are consuming 98% of the /home filesystem.

    4. Inodes on /home are nearly exhausted.

    5. Inodes on /home are 98% free.

  7. Of the following directories, which one is the most important to back up on a routine basis?

    1. /var

    2. /tmp

    3. /usr

    4. /root

    5. /etc

  8. Carolyn has a text file named guest_list containing 12 lines. She executes the following command. What is the result?

     #  split -4 guest_list gl 

    1. The first four columns in the text are written to new files glaa, glab, glac, and glad.

    2. The first four columns in the text are written to new files aagl, abgl, acgl, and adgl.

    3. The lines of guest_list are evenly divided among new files glaa, glab, glac, and glad.

    4. The lines of guest_list are evenly divided among new files glaa, glab, and glac.

    5. The lines of guest_list are evenly divided among new files aagl, abgl, and acgl.

  9. Which one of the following commands would be best suited to mount a CD-ROM containing a Linux distribution, without depending on any configuration files?

    1. mount /dev/cdrom /dev/hdc

    2. mount -f linux /dev/hdc /mnt/cdrom

    3. mount -t iso9660 /dev/cdrom /mnt/cdrom

    4. mount -t linux /dev/cdrom /mnt/cdrom

    5. mount -t iso9660 /mnt/cdrom /dev/cdrom

  10. An ext2 filesystem is configured with user quotas enabled. The soft limit is set at 100 MB per user, the hard limit is set at 110 MB per user, and the grace period is seven days. User bsmith already owns 90 MB of the data stored on the filesystem. What happens when bsmith writes a new file of size 30 MB? Select one.

    1. The write will fail, but the superuser can recover the entire file within seven days.

    2. The write will fail, and the file will be truncated permanently.

    3. The write will succeed, but the file will be truncated permanently.

    4. The write will succeed, but the file will be available for only seven days.

    5. The write will succeed, but the file will be truncated in seven days.

  11. Which of the following commands displays the comments from a bash script? Select all that apply.

    1. find "^#" /etc/rc.d/rc.local

    2. sed '/^#/ !d' /etc/rc.d/init.d/httpd

    3. grep ^# /etc/rc.d/init.d/httpd

    4. grep ^# /etc/passwd

    5. locate "^#" /etc/skel/.bashrc

  12. State the syntax to direct the standard output of cmd1 directly into the standard input of cmd2.

  13. Which one of the following answers creates an environment variable VAR1, present in the environment of a bash child process?

    1. VAR1="fail" ; export VAR1

    2. VAR1="fail" \ export VAR1

    3. VAR1="fail"

    4. set VAR1="fail" ; enable VAR1

    5. export VAR1 \ VAR1="fail"

  14. Which of the following directories must be part of the root filesystem? Select two of the following that apply.

    1. /etc

    2. /home

    3. /lib

    4. /usr

    5. /root

  15. Alex is currently working in a directory containing only one file, Afile1. What is displayed after the following commands are entered in bash?

     # MYVAR=ls # echo $MYVAR "$MYVAR" '$MYVAR' '$MYVAR' 

    1. Afile1 Afile1 Afile1 Afile1

    2. ls Afile1 Afile1 Afile1

    3. ls ls Afile1 Afile1

    4. ls ls $MYVAR Afile1

    5. ls ls ls $MYVAR

  16. What does the & character do when placed at the end of a command?

    1. It allows another command to be entered on the same line.

    2. It causes the process to be stopped.

    3. It restarts a stopped process.

    4. It causes the process to be placed into the foreground.

    5. It causes the process to be placed into the background.

  17. Which one of the following commands could be used to change all uppercase characters to lowercase in the middle of a pipe?

    1. grep

    2. egrep

    3. wc

    4. tr

    5. pr

  18. What is the PID of init? Select one.

    1. 0

    2. 1

    3. 2

    4. undefined

    5. unknown

  19. Which one of the following outcomes results from the following command?

     # chmod g+s /home/software 

    1. The SUID bit will be set for /home/software.

    2. The SGID bit will be set for /home/software, preventing access by those not a member of the software group.

    3. The SGID bit will be set for /home/software, in order to keep group membership of the directory consistent for all files created.

    4. The sticky bit will be set for /home/software.

    5. The sticky bit will be applied to all files in /home/software.

  20. Which one of the following commands is equivalent to the following command for user jdoe whose home directory is /home/jdoe?

     # chmod 754 ~/file1 

    1. chmod u=rwx,g=rx,o=r /home/jdoe/file1

    2. chmod ugo=rwx ~/file1

    3. chmod u=7,g=5,o=4 ~/file1

    4. chmod 754 \home\jdoe\file1

    5. chmod 754 /usr/jdoe/file1

  21. What command and single required option creates a symbolic link in a Linux filesystem?

  22. What command can display the contents of a binary file in a readable hexadecimal form? Select one.

    1. xd

    2. hd

    3. od

    4. Xd

    5. dump

  23. Which one of the following commands copies files with the .txt extension from /dir1 into /dir2, while preserving file attributes such as dates?

    1. mv --copy /dir1/*.txt /dir2

    2. mv /dir1/*.txt /dir2

    3. cp -k /dir1/*.txt /dir2

    4. cp -p /dir1/*.txt /dir2

    5. cp -p /dir2 < /dir1/*.txt

  24. Which one of the following file globs matches "Linux" and "linux," but not "linux.com" and not "TurboLinux"?

    1. [L/linux]

    2. ?inux

    3. \L\linux

    4. [Ll]inux

    5. [Ll]inux?

  25. A process with PID 4077 is misbehaving on your system. As superuser, you enter the following command:

     # kill 4077 

    However, nothing changes as a result. What can you do to terminate the process? Select one.

    1. kill -9 4077

    2. kill -1 4077

    3. kill +9 4077

    4. kill 4078

    5. kill --die 4077

  26. Which one of the following key sequences is used to put a noninteractive text-mode program that is attached to the terminal into the background to allow it to continue processing?

    1. Ctrl-C

    2. Ctrl-B

    3. Ctrl-B and then enter the bg command

    4. Ctrl-Z

    5. Ctrl-Z and then enter the bg command

  27. What basic command is used to create hard disk partitions?

  28. With a umask of 027, how is the initial mode set for a newly created file?

    1. 0750

    2. 0640

    3. 0027

    4. 1027

    5. 1640

  29. Which one of the following commands verbosely extracts files from a tar archive on a magnetic tape device?

    1. tar cvf /dev/st0

    2. tar cvf /dev/ttyS0

    3. tar xvf /dev/st0

    4. tar xvf /dev/ttyS0

    5. tar rvf /dev/st0

  30. Alex wants to protect himself from inadvertently overwriting files when copying them with cp. How should he go about this?

    1. Put alias cp='cp -i' in ~/.bashrc.

    2. Put alias cp='cp -i' in ~/.bash_profile.

    3. Put alias cp='cp -p' in ~/.bashrc.

    4. Put alias cp='cp -p' in ~/.bash_profile.

    5. Put alias cp='cp -I' in ~/.bashrc.

  31. Which one of the following utilities outputs a text file with line numbers along the left margin?

    1. tar

    2. wc

    3. tr

    4. nl

    5. ln

  32. The following line comes from /etc/fstab Which of the statements is accurate given the contents of this line? Choose two that apply.

     /dev/fd0   /mnt/fd0   vfat   noauto,users  0 0 

    1. Users are prohibited from mounting and unmounting the filesystem.

    2. Users are permitted to mount and unmount the filesystem.

    3. The filesystem will be mounted on mount point /dev/fd0.

    4. The filesystem is expected to be a Linux native filesystem.

    5. The filesystem is on a floppy disk.

  33. Which one of the following is an accurate statement regarding this regular expression?

     [^1-8A-Za-z] 

    1. It matches all letters and numbers.

    2. It matches all letters and numbers except 9.

    3. It matches all letters and numbers except 9 and 0, but only at the beginning of a line.

    4. It matches 9, 0, and other nonletter and nonnumber characters.

    5. It matches characters other than letters or numbers.

  34. Monica consults the /etc/passwd file expecting to find encrypted passwords for all of the users on her system. She sees the following:

     jdoe:x:500:500::/home/jdoe:/bin/bash bsmith:x:501:501::/home/bsmith:/bin/tcsh 

    Which of the following is true? Select one.

    1. Accounts jdoe and bsmith have no passwords.

    2. Accounts jdoe and bsmith are disabled.

    3. The passwords are in /etc/passwd-

    4. The passwords are in /etc/shadow

    5. The passwords are in /etc/shadow-

  35. What command (include applicable options) is used to initiate a change to runlevel 5?

  36. What does the "sticky bit" do? Select one.

    1. It prevents files from being deleted by anyone.

    2. It marks files for deletion.

    3. It prevents files from being deleted by nonowners except root.

    4. It prevents files from being deleted by nonowners including root.

    5. It marks files for archive.

  37. Dave has a Linux system with an interrupt conflict caused by his 3c509 network card. Dave's kernel is fully modular. How could Dave instruct the system to use IRQ 11 for his network adapter?

    1. Enter linux eth0=irq11 at the LILO boot loader prompt.

    2. Enter linux 3c509=irq11 at the LILO boot loader prompt.

    3. Add options 3c509 irq=11 to /etc/conf.modules.

    4. Add options irq=11 3c509 to /etc/conf.modules.

    5. Add ifup -irq 11 eth0 to /etc/rc.d/rc.sysinit.

  38. What is contained in directory /sbin? Select the single best answer.

    1. Commands needed in the event of a system emergency of interest to all system users.

    2. Commands of interest to all system users.

    3. Commands needed in the event of a system emergency of interest mainly to the administrator.

    4. Commands of interest mainly to the administrator.

    5. Libraries needed in the event of an emergency.

  39. What ext2 filesystem attribute allows a process to take on the ownership of the executable file's owner?

  40. What is appended to the beginning of a command line in order to modify the execution priority of the resulting process?

  41. How are the cat and tac commands related? Select one.

    1. cat displays files and tac does the same but in reverse order.

    2. cat concatenates files while tac splits a file into pieces.

    3. cat creates file catalogs while tac displays the catalogs.

    4. The two commands are links to the same executable.

    5. There is no relation or similarity between cat and tac.

  42. With regard to the use of regular expressions to match text in a file, describe a metacharacter. Select one.

    1. They are standard text characters used in the regular expression.

    2. They are special control characters used in the regular expression.

    3. They are used to display results after using a regular expression.

    4. They are used by the shell to display graphics.

    5. Metacharacters aren't used in regular expressions.

  43. How many IDE devices can be installed and simultaneously used in a typical Intel-based system? Select one.

    1. 1

    2. 2

    3. 3

    4. 4

    5. 5

  44. Which one of the following would be a consequence of a filesystem running out of inodes?

    1. More inodes would be automatically created in the filesystem.

    2. Quotas would become disabled on the filesystem.

    3. The filesystem would be corrupted.

    4. The filesystem would be marked read-only.

    5. No writes would be possible on the filesystem until existing files were deleted.

  45. Consider the following line of console output, excerpted from among other lines of output. Which one of the commands produced it?

     /dev/hda8      1.9G  559M  1.2G  30% /home 

    1. du -s

    2. du -k

    3. df -h

    4. df -k

    5. df -m

  46. Which one of the following is true about the LILO boot loader?

    1. It can start the Windows NT Loader.

    2. It is started using the lilo command.

    3. It is the only boot loader available for Linux.

    4. It can start multiple Linux kernels, but no foreign operating systems.

    5. It resides entirely in the boot sector.

  47. Which one of the following statements correctly describes the > and >> symbols in the context of the bash shell?

    1. > appends standard output to an existing file, and >> writes standard output to a new file.

    2. > writes standard output to a new file, and >> appends standard output to an existing file.

    3. > writes standard error to a new file, and >> appends standard error to an existing file.

    4. > pipes standard output to a new file, and >> pipes standard output to an existing file.

    5. > pipes standard output to an existing file and >> pipes standard error to a new file.

  48. What is the correct syntax to remove mypkg entirely from a Debian GNU/Linux system, including configuration files? Select one.

    1. dpkg -r mypkg

    2. dpkg --remove mypkg

    3. dpkg --kill mypkg

    4. dpkg -R mypkg

    5. dpkg --purge mypkg

  49. Your system's FontPath directives include only one entry:

     unix/:-1 

    Which of the following is true? Select one.

    1. Error -1 has occurred during X startup

    2. Only the default font will be available to applications

    3. An X font server is to be used

    4. An X font server failed to initialize

    5. No fonts were found by XFree86 or by a font server

  50. How do you use dpkg to verify the status of an installed package mypkg? Select one.

    1. dpkg -s mypkg

    2. dpkg -S mypkg

    3. dpkg -stat mypkg

    4. dpkg --stat mypkg

    5. dpkg --Status mypkg

  51. Which of the following statements is true about an X server? Select one.

    1. An X server is a high-performance system offering graphical programs over a network.

    2. An X server sends its graphical output to a window manager.

    3. An X server is under the control of a window manager.

    4. A window manager is under the control of an X server.

    5. A window manager is also known as an X server.

  52. What are the two interrupts usually associated with a PC's onboard serial interface?

  53. How can you query the RPM database for a list of all installed RPM packages? Select one.

    1. rpm -q

    2. rpm -qa

    3. rpm -a

    4. rpm -al

    5. rpm -qal

  54. Which pair of dpkg options are equivalent and what do they do? Select one.

    1. -C and --configure; they reconfigure an unpackaged package.

    2. -C and --clear-avail; they erase existing information about what packages are available.

    3. -A and --audit; they update information about what packages are available.

    4. -C and --audit; they provide resource consumption information on installed packages.

    5. -C and --audit; they search for partially installed packages.

  55. What will happen when rpm is launched as follows?

     rpm -Uvh file 

    1. The RPM file will be verified.

    2. An installed package may be upgraded with the version in file, with verbose output.

    3. An installed package may be upgraded with the version in file, with verbose output and hash marks indicating progress.

    4. An error will occur because a major mode is not specified.

    5. An error will occur because no file options were specified.

  56. How are changes to the system BIOS made? Select one.

    1. Using linuxconf.

    2. By manually editing text files.

    3. Using the lilo command.

    4. At boot time using system-specific menus.

    5. At boot time using LILO commands.

  57. When using xdm, which of the following files can be used to start a window manager? Select one.

    1. Xservers

    2. Xaccess

    3. xdm-config

    4. Xsession

    5. Xsetup_0

  58. When partitioning a disk with more than 1024 cylinders, which of the following could affect the system's ability to boot? Select all that apply.

    1. Location of LILO on disk.

    2. Location of /boot on disk.

    3. Location of /var on disk.

    4. Disk transfer rate.

    5. Disk seek time.

  59. Which of the following is a reasonable size for a swap partition for a Linux workstation with 128 MB RAM? Select one.

    1. 1 KB

    2. 0.5 MB

    3. 100 MB

    4. 5 GB

    5. 10 GB

  60. What is XDMCP, and how is it used? Select one.

    1. An X utility, used to copy files between a host and an X terminal.

    2. An X utility, used to configure XDM.

    3. An X utility, used to configure IP addresses on X terminals on the network.

    4. An X protocol, used to discover/listen for X terminals on the network.

    5. An X protocol, used to exchange graphics information between X clients and X servers over the network.

  61. How many target devices can be added to an 8-bit SCSI-2 bus? Select one.

    1. 6

    2. 7

    3. 8

    4. 15

    5. 16

  62. What is the startx command? Select one.

    1. A script included with XFree86 to make startup user friendly.

    2. A script used to start xdm.

    3. A compiled binary program that directly launches the X server.

    4. A configuration file created by X configuration tools such as XF86Config.

    5. A script originated by Linux distributors to tailor X startup to their particular X implementation.

  63. How can you obtain a list of files contained in an .rpm file? Select one.

    1. rpm -q file

    2. rpm -i file

    3. rpm -ql file

    4. rpm -qlp file

    5. rpm -qal file

  64. Which of the following accurately describes the contents of the xdisp:1.0 DISPLAY environment variable? Select one.

    1. System xdisp is to send X programs to the first display of the local X server.

    2. System xdisp is to receive X programs on the first display of its X server.

    3. System xdisp is to receive X programs on the second display of its X server.

    4. Local program xdisp is to use the second display of the local X server.

    5. Local program xdisp is to use the second display of any available X terminal.

  65. Which file contains information on the I/O port assignments in use? Select one.

    1. /dev/ioports

    2. /etc/ioports

    3. /etc/sysconfig/ioports

    4. /etc/proc/ioports

    5. /proc/ioports

  66. Why might an administrator use the --force option for rpm?

    1. To overwrite a previously installed package.

    2. To overwrite a Debian package.

    3. To prevent confirmation messages.

    4. To force the deletion of installed packages.

    5. To force the deletion of package dependencies.

  67. Which of the following commands cannot be used to exit from vi when in command mode? Select one.

    1. ZZ

    2. :x

    3. :q

    4. :q!

    5. :bye

  68. Which is not a valid dpkg installation command? Select one.

    1. dpkg -i package_file

    2. dpkg -iL package_file

    3. dpkg -iR package_dir

    4. dpkg -iG package_file

    5. dpkg -iE package_file

  69. Which of the following is the text file that contains directories where the dynamic linker should look for libraries? Select one.

    1. ld.so.conf

    2. conf.ld.so

    3. ld.so.cache

    4. so.config

    5. configld




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