101-500 : LPIC-1 Exam 101 : Part 06
-
Which of the following commands can perform searches on file contents using regular expressions?
-
find
-
locate
-
grep
-
reggrep
-
pgrep
-
-
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
-
-
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
-
-
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
-
-
If the
gzip
compressed tar archivetexts.tgz
contains the filesa.txt
and b.txt, which files will be present in the current directory after runninggunzip 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
-
-
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
oryj2
followed by escape.
- By using the command
-
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.
- The command’s output is redirected to
-
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
-
-
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)
-
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
-
-
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
-
-
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.
-
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 usedmesg
to view the logs. - Using chroot to switch to the file system on the hard disk and use dmesg to view the logs.
-
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.
-
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
-
-
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.
-
Which of the following commands loads a kernel module along with any required dependency modules?
-
depmod
-
modprobe
-
module_install
-
insmod
-
loadmod
-
-
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
-
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
-
-
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
andK01apache2
are run during a system shutdown. K01apache2
is run when runlevel 1 is entered.
Subscribe
0 Comments
Newest