LPIC-2 Exam 201
Question No: 181 CORRECT TEXT – (Topic 8)
After creating a backup of the users home directories called backup.cpio you are asked to restore a file called memo.ben. What command should you type?
Answer: cpio -iF backup.cpio memo.ben
Explanation: The ‘cpio’ command is used to create backups or restore files from a
backup. The -i option is to extract something. The F option is to specify a file. Here we are extracting memo.ben from a file named backup.cpio.
Question No: 182 – (Topic 8)
While attempting to boot your i386 system, the boot process fails with a message that the root filesystem could not be mounted. Which stage of the boot process is failing?
Explanation: When the kernel is loaded, it mounts the root filesystem. The root filesystem cannot be mounted; therefore the boot process has failed at the kernel stage.
B:The boot loader is stored in the master boot record by default. The boot loader loads the kernel, which then mounts the root filesystem.
C:The BIOS POST (power on self check) is the first part of the boot process. It does not mount the root filesystem.
D:Fsck runs after the root filesystem is mounted.
E:Init runs after the root filesystem is mounted.
Question No: 183 – (Topic 8)
You enter the command
cat MyFile | sort gt; DirList amp;
and the operating system displays  3499
What does this mean?
This is job number 4 and the PID of the sort command is 3499.
This is job number 4 and the PID of the job is 3499.
This is job number 3499 and the PID of the cat command is 4.
This is job number 4 and the PID of the cat command is 3499.
Question No: 184 – (Topic 8)
You want to enter a series of commands from the command line. What would be the quickest way to do this?
Press enter after entering each command and its arguments.
Put them in a script and execute the script.
Separate each command with a semi-colon (;) and press enter after the last command.
Separate each command with a / and press enter after the last command.
Explanation: You can enter multiple commands on one line by separating them with a semi-colon (;). Pressing enter after the last command will run the commands.
A:Pressing enter after a command will run the command before you can enter another command.
B:A script listing the commands would work but this isn’t the quickest way of doing it.
D:You need to use semi-colons (;) to separate the commands, not forward slashes (/).
Question No: 185 – (Topic 8)
While installing a new Ethernet card you notice ifconfig is showing an odd IRQ for the device. What command will make lspci show which IRQ the card is actually using as seen by the PCI bus instead of as seen by the kernel?
lspci -v -v
lspci -v -M
lspci -v -b
lspci -m -v
Explanation: Lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them. The -v option tells lspci to be verbose and display detailed information about all devices. The -b option is for bus-centric view. Show all IRQ numbers and addresses as seen by the cards on the PCI bus instead of as seen by the kernel.
A:You can’t specify the same option twice (-v -v).
B:The -M option invokes bus mapping mode which scans the bus extensively to find all devices including those behind misconfigured bridges etc.
D:The options should be separated by hyphens (-). Furthermore, M is the wrong option.
E:The -m option is used to dump PCI device data in machine readable form for easy parsing by scripts.
Question No: 186 – (Topic 8)
After experimenting with vi as your command line editor, you decide that you want to have vi your default editor every time you log in. What would be the appropriate way to do this?
Change the /etc/inputrc file
Change the /etc/profile file
Change the ~/.inputrc file
Change the ~/.profile file
Explanation: The .inputrc file is used to control your shell. You can set keystrokes to perform specified functions with this file. Another setting that can be changed is the command line editor. If you want this setting to only affect you, you edit the file in your home directory (~/ signifies your home directory).
A:The settings in the /etc/inputrc file would affect all users. If you want this setting to only affect you, you edit the file in your home directory.
B:The default editor is not set in this file.
D:The default editor is not set in this file.
Question No: 187 – (Topic 8)
You have written a script called usrs to parse the passwd file and create a list of usernames. You want to have this run at 5 am tomorrow so you can see the results when you get to work. Which of the following commands will work?
at 5:00 wed usrs
at 5:00 wed -b usrs
at 5:00 wed -l usrs
at 5:00 wed -d usrs
Explanation: The ‘at’ command is used to execute commands at a specified time and optional date. It can contain an optional date, formed as a month and date, a day of the week, or a special keyword (today or tomorrow). An increment can also be specified.
B:No options are required to run the script at the specified time. Furthermore, the options should be specified before the time and date, not after them.
C:No options are required to run the script at the specified time. Furthermore, the options should be specified before the time and date, not after them.
D:No options are required to run the script at the specified time. Furthermore, the options should be specified before the time and date, not after them.
Question No: 188 CORRECT TEXT – (Topic 8)
In order to display the last five commands you have entered using the history command, you would type .
Answer: history 5
Explanation: The history command is used to display the previously entered commands. If you typed history with no arguments, you would likely get a long scrolling list of commands. By typing a number after ‘history’, you will display only the last lt;numbergt; of commands.
Question No: 189 – (Topic 8)
You issue the command jobs and receive the following output:
- Stopped (tty output) pine
 Stopped (tty output) MyScript
How would you bring the MyScript process to the foreground?
Explanation: You can bring a background job to the foreground by executing the quot;fgquot; command. If there are several background jobs, then you must indicate which job you wish to move to the foreground by indicating its job number. The syntax would be fg %lt;job numbergt;.
B:Ctrl-c is used to stop a running command/job. It does not bring a background job to the foreground.
C:If there are several background jobs, then you must indicate which job you wish to move to the foreground by indicating its job number.
D:Ctrl-z is used to suspend a running command/job without ending it. It does not bring a background job to the foreground.
Question No: 190 – (Topic 8)
You have downloaded the patch from 2.2.18 to 2.2.19, and applied it to /usr/src/linux, where you had previously configured and built kernel 2.2.18. How would you avoid going through the entire configuration process again, and only configure options which are new to the patched kernel?
Edit .config by hand
Explanation: The ‘make oldconfig’ command will take the kernel config file named quot;.configquot; and only ask the configuration questions which are not already answered in that file. This will avoid having to go through the entire kernel configuration process again.
B:Make reconfigure is not a valid command.
C:Sh scripts/reconfig is not a valid command.
D:Editing the .config file by hand would be a difficult and very risky way of configuring the kernel.
|Lowest Price Guarantee||Yes||No||No|
|Free VCE Simulator||Yes||No||No|