101-500 : LPIC-1 Exam 101 : Part 06

  1. Which of the following commands can perform searches on file contents using regular expressions?

    • find
    • locate
    • grep
    • reggrep
    • pgrep
  2. In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?

    • -maxdepth
    • -dirmax
    • -maxlevels
    • -s
    • -n
  3. Which of the following commands determines a file’s format by using a definition database file which contains information about all common file types?

    • type
    • file
    • magic
    • pmagic
    • hash
  4. Which of the following commands generates a list of user names from /etc/passwd along with their login shell?

    • column -s : 1,7 /etc/passwd
    • chop -c 1,7 /etc/passwd
    • colrm 1,7 /etc/passwd
    • sort -t: -k1,7 /etc/passwd
    • cut -d: -f1,7 /etc/passwd
  5. If the gzip compressed tar archive texts.tgz contains the files a.txt and b.txt, which files will be present in the current directory after running gunzip texts.tgz?

    • Only a.txt, b.txt, and texts.tgz
    • Only texts.tar and texts.tgz
    • Only a.txt.gz and b.txt.gz
    • Only a.txt and b.txt
    • Only texts.tar
  6. In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?

    • By using the command :repeat followed by the number and the command
    • By specifying the number right in front of a command such as 41 or 2yj.
    • By selecting all affected lines using the shit and cursor keys before applying the command.
    • By issuing a command such as :set repetition=4 with repeats every subsequent command 4 times.
    • By specifying the number after a command such as 14 or yj2 followed by escape.
  7. Which of the following statements is correct for a command ending with an & character?

    • The command’s output is redirected to /dev/null.
    • The command is run in background of the current shell.
    • The command’s output is executed by the shell.
    • The command is run as a direct child of the init process.
    • The command’s input is read from /dev/null.
  8. Which of the following commands reads a file and creates separate chunks of a given size from the file’s contents?

    • ar
    • cat
    • break
    • split
    • parted
  9. What is the purpose of the xargs command?

    • It passes arguments to an X server.
    • It repeats the execution of a command using different parameters for each invocation.
    • It reads standard input and builds up commands to execute.
    • It asks a question, graphically, and returns the answer to the shell.
    • It allows specifying long options (like –help) for commands that normally only accept short options (like -h)
  10. FILL BLANK

    Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)

    • jobs
  11. FILL BLANK

    Which command is used to change the priority of an already running process? (Specify ONLY the command without any path or parameters.)

    • renice
  12. In Bash, inserting 1>&2 after a command redirects…

    • …standard error to standard input.
    • …standard output to standard error.
    • …standard input to standard error.
    • …standard error to standard output.
    • …standard output to standard input.
  13. When booting from the hard disk, a computer successfully loads the Linux kernel and initramfs but hangs during the subsequent startup tasks. The system is booted using a Linux based rescue CD to investigate the problem. Which of the following methods helps to identify the root cause of the problem?

    • Using the dmesg command from the rescue CD’s shell to view the original system’s boot logs.
    • Investigating the file /proc/kmsg on the computer’s hard disk for possible errors.
    • Investigating the file /var/log on the computer’s hard disk for possible errors.
    • Using chroot to switch to the file system on the hard disk and use dmesg to view the logs.
    • Using chroot to switch to the file system on the hard disk and use dmesg to view the logs.
  14. Where is the bootloader stored on the hard disk of a UEFI system?

    • In the EFI Boot Record (EBR).
    • In the Master Boot Record (MBR).
    • On the EFI System Partition (ESP).
    • On the partition labeled boot.
    • On the partition number 127.
  15. What is the correct way to set the default systemd boot target to multi-user?

    • systemctl isolate multi-user.target
    • systemctl set-runlevel multi-user.target
    • systemctl set-boot multi-user.target
    • systemctl set-default multi-user.target
    • systemctl boot -p multi-user.target
  16. Which of the following statements are correct about the initial RAM disk involved in the boot process of Linux? (Choose two.)

    • An initramfs is a compressed file system archive, which can be unpacked to examine its contents.
    • An initramfs file contains the MBR, the bootloader and the Linux kernel.
    • After a successful boot, the initramfs contents are available in /run/initramfs/.
    • The kernel uses the initramfs temporarily before accessing the real root file system.
    • An initramfs does not depend on a specific kernel version and is not changed after the initial installation.
  17. Which of the following commands loads a kernel module along with any required dependency modules?

    • depmod
    • modprobe
    • module_install
    • insmod
    • loadmod
  18. What information can the lspci command display about the system hardware? (Choose three.)

    • System battery type
    • Device IRQ settings
    • PCI bus speed
    • Ethernet MAC address
    • Device vendor identification
  19. FILL BLANK

    Which System V init configuration file is commonly used to set the default run level? (Specify the full name of the file, including path.)

    • /etc/inittab
  20. Given the following two symbolic links in a System V init configuration:

    /etc/rc1.d/K01apache2
    /etc/rc2.d/S02apache2

    When are the scripts executed that are referenced by these links? (Choose two.)

    • S02apache2 is run when runlevel 2 is entered.
    • S02apache2 is run when runlevel 2 is left.
    • K01apache2 is never run because K indicates a deactivated service.
    • Both S02apache2 and K01apache2 are run during a system shutdown.
    • K01apache2 is run when runlevel 1 is entered.
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments