74.

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.1 Questions

  1. What section of the online user's manual and command reference holds administrative (not user) commands? Select one.

    1. Section 1

    2. Section 2

    3. Section 8

    4. Section n

    5. Section s

  2. What two commands will display the status of processes on a Linux system? Select one.

    1. ls and df

    2. ps and top

    3. ps and df

    4. df and top

    5. du and df

  3. What does the device file /dev/hdb6 represent? Select one.

    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

  4. Which command will display the last lines of text file file1? Select one.

    1. head -bfile1

    2. head --bottomfile1

    3. head -vfile1

    4. tailfile1

    5. tail -n 1file1

  5. In the bash shell, entering the !! command 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

  6. Which of the following commands can be used to check an ext2 filesystem? Select all 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

  7. Name the command that displays pages from the online user's manual and command reference.

  8. 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 percent of the physical disk.

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

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

    4. Inodes on /home are nearly exhausted.

    5. Inodes on /home are 98 percent free.

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

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

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

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

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

  13. User jdoe, a member of the finance group, owns a text file with group owner finance and mode 0077. Which statements are true regarding access to view the contents of the file, assuming the directory that contains it has mode 0777 ? Select all that apply.

    1. jdoe can view the file's contents.

    2. jdoe can first change the protection mode of the file and then view the file's contents.

    3. root cannot view the file's contents.

    4. Everyone in the finance group can view the file's contents except jdoe.

    5. Everyone in the finance group can view the file's contents including jdoe.

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

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

  16. 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"

  17. Name the full path and name of the file that holds most of the information on system user groups.

  18. Which of the following directories must be part of the root filesystem? Select all that apply.

    1. /etc

    2. /home

    3. /lib

    4. /usr

    5. /root

  19. Name the facility that independently executes commands on a periodic basis for multiple users.

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

    # MYVAR=ls # echo $MYVAR "$MYVAR" '$MYVAR' `$MYVAR`
    1. Afile1 Afile1 Afile1 Afile1

    2. lsAfile1 Afile1 Afile1

    3. lslsAfile1 Afile1

    4. ls ls$MYVAR Afile1

    5. ls ls ls $MYVAR

  21. What does the & character do when placed at the end of a command? Select one.

    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.

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

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

    1. 0

    2. 1

    3. 2

    4. undefined

    5. unknown

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

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

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

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

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

  29. 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?

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

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

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

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

    1. 0750

    2. 0640

    3. 0027

    4. 1027

    5. 1640

  34. Consider the following script, stored in a file with proper modes for execution:

    #!/bin/bash for $v1 in a1 a2 do echo $v1 done

    Which one of the following best represents the output produced on a terminal by this script?

    1. in

      a1

      a2

    2. a1

      a2

    3. $v1

      $v1

      $v1

    4. No output is produced, but the script executes correctly.

    5. No output is produced, because the script has an error.

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

  36. Alex wants to protect himself from inadvertently overwriting files when copying them, so he wants to alias cp to prevent overwrite. How should he go about this? Select one.

    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.

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

  38. The following line comes from an /etc/fstab file. Which of the statements is accurate given the contents of this line? Choose all 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.

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

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

  41. Name the briefest form of the command to initiate a change to runlevel 5.

  42. Where does The Linux System Administrators' Guide originate? Select one.

    1. Red Hat Software, Inc.

    2. O'Reilly and Associates, Inc.

    3. The Free Software Foundation.

    4. The Linux Documentation Project.

    5. Usenet newsgroup comp.os.linux.

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

  44. What variable holds the list of directories searched by the shell to find executable programs?

  45. Which one of the following commands displays the full path and name of the executable program myprog that the shell would execute if myprog were entered as a command?

    1. # which myprog

    2. # find -name myprog

    3. # find myprog

    4. # locate myprog

    5. # apropos myprog

  46. Alex executes the runlevel command and gets 3 5 as the response. What does this tell Alex? Select one.

    1. The system is in runlevel 3 and the default is 5.

    2. The system is in runlevel 3 and will next go to runlevel 5.

    3. The system was in runlevel 3 and is now in runlevel 5.

    4. The system does not have a default runlevel.

    5. The system default runlevel is improperly configured.

  47. Which one of these files determines how messages are stored using syslogd?

    1. /etc/sysconfig/logger.conf

    2. /etc/syslog.conf

    3. /etc/syslogd.conf

    4. /etc/conf.syslog

    5. /etc/conf.syslogd

  48. What does the pr command do? Select one.

    1. It prints files to the default printer.

    2. It displays a list of active processes.

    3. It modifies the execution priority of a process.

    4. It paginates text files.

    5. It modifies the command-line prompt.

  49. 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 interrupt 11 for his network adapter? Select one.

    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.

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

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

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

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

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

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

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

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

  58. How can you configure your system at shutdown time to suppress fsck upon the next boot? Select one.

    1. init 6

    2. init --suppress 6

    3. shutdown -h

    4. shutdown -f

    5. shutdown -F

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

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

 


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