LPI 010-160 Practice Test 43
Question 420
A colon-separated file contains login names and numeric identifiers. Which underlying Linux principle BEST explains the correct procedure for cut delimited fields?
- `|` passes one command's standard output to the next command's standard input.
- `sort` orders lines while other tools filter or count them.
- `cut` selects fields based on the delimiter and field number.
- Quoted expansion prevents unintended splitting and globbing of argument values.
Explanation
Correct Answer
C:`cut` selects fields based on the delimiter and field number. The procedure it justifies is to use `cut -d ':' -f 2 file` to extract the second delimiter-separated field. This also allows checking that output contains the requested field instead of full records.
Incorrect Answers
A:`|` passes one command's standard output to the next command's standard input. It describes Pipes connecting commands, not the behavior that controls this cut delimited fields case. Choosing the wrong field or delimiter yields incorrect values.
B:`sort` orders lines while other tools filter or count them. It describes sort text records, not the behavior that controls this cut delimited fields case. Choosing the wrong field or delimiter yields incorrect values.
D:Quoted expansion prevents unintended splitting and globbing of argument values. It describes Quoting script argument expansion, not the behavior that controls this cut delimited fields case. Choosing the wrong field or delimiter yields incorrect values.
Question 421
A monitoring script needs to add one new line without erasing prior entries. Which underlying Linux principle BEST explains the correct procedure for Redirecting output and append?
- `cut` selects fields based on the delimiter and field number.
- `tar -c` creates an archive and `-f` supplies its filename.
- `wc -l` counts newline characters rather than all byte or word units.
- Shell redirection changes file-writing behavior before a program processes its arguments.
Explanation
Correct Answer
D:Shell redirection changes file-writing behavior before a program processes its arguments. The procedure it justifies is to use `>` to overwrite stdout to a file and `>>` to append stdout to the file. This also allows checking that the target file is replaced or extended according to the chosen operator.
Incorrect Answers
A:`cut` selects fields based on the delimiter and field number. It describes cut delimited fields, not the behavior that controls this Redirecting output and append case. The wrong operator can discard previous output or accumulate stale content.
B:`tar -c` creates an archive and `-f` supplies its filename. It describes Creating a tar archive, not the behavior that controls this Redirecting output and append case. The wrong operator can discard previous output or accumulate stale content.
C:`wc -l` counts newline characters rather than all byte or word units. It describes wc line counting, not the behavior that controls this Redirecting output and append case. The wrong operator can discard previous output or accumulate stale content.
Question 422
A trainee sees a command name shadowed by an alias and wants to inspect its resolution. Which underlying Linux principle BEST explains the correct procedure for type and builtin identification?
- `$?` contains the previous foreground command's exit status in Bash.
- Unquoted whitespace can split one intended argument into several tokens.
- Current-directory reporting is different from changing directories.
- Bash `type` reports command interpretation rather than a file's content type.
Explanation
Correct Answer
D:Bash `type` reports command interpretation rather than a file's content type. The procedure it justifies is to use `type cd` or `type name` to examine how Bash interprets the command. This also allows checking that the result identifies a builtin, alias, keyword or executable as applicable.
Incorrect Answers
A:`$?` contains the previous foreground command's exit status in Bash. It describes Exit status from previous command, not the behavior that controls this type and builtin identification case. Using the file viewer cannot reveal all shell alias resolution paths.
B:Unquoted whitespace can split one intended argument into several tokens. It describes Escaping spaces in shell paths, not the behavior that controls this type and builtin identification case. Using the file viewer cannot reveal all shell alias resolution paths.
C:Current-directory reporting is different from changing directories. It describes pwd current directory, not the behavior that controls this type and builtin identification case. Using the file viewer cannot reveal all shell alias resolution paths.
Question 423
A technician estimates power needs for storage and additional graphics hardware. Which underlying Linux principle BEST explains the correct procedure for Power supply for components?
- SSDs store data without mechanical moving heads while HDDs use rotating media.
- Removable media may appear as block devices but the mount location is distinct from the device node.
- Distribution life cycles determine when a release receives supported fixes and upgrades.
- The PSU converts and distributes power to system components and must meet load needs.
Explanation
Correct Answer
D:The PSU converts and distributes power to system components and must meet load needs. The procedure it justifies is to verify that the power supply delivers suitable wattage and connector capacity. This also allows checking that the machine remains stable under the expected electrical load.
Incorrect Answers
A:SSDs store data without mechanical moving heads while HDDs use rotating media. It describes SSD versus rotational disk, not the behavior that controls this Power supply for components case. Underpowered hardware can cause instability despite healthy software.
B:Removable media may appear as block devices but the mount location is distinct from the device node. It describes Removable USB block storage, not the behavior that controls this Power supply for components case. Underpowered hardware can cause instability despite healthy software.
C:Distribution life cycles determine when a release receives supported fixes and upgrades. It describes Distribution life cycle versus installed version, not the behavior that controls this Power supply for components case. Underpowered hardware can cause instability despite healthy software.
Question 424
An operator needs to explain why file deletion depends on the containing directory. Which underlying Linux principle BEST explains the correct procedure for Directory write and delete rights?
- Unlinking a file requires permissions on its directory rather than necessarily on the file's own write bit.
- Directory execute permission controls traversal or search, not execution of the files it contains.
- Octal permissions use bit sums read 4, write 2 and execute 1 within each class.
- Unix groups provide a way to assign shared access to users and files.
Explanation
Correct Answer
A:Unlinking a file requires permissions on its directory rather than necessarily on the file's own write bit. The procedure it justifies is to check write plus execute permissions on the parent directory and any sticky-bit restrictions. This also allows checking that deletion is allowed or denied according to directory-level rights and protection.
Incorrect Answers
B:Directory execute permission controls traversal or search, not execution of the files it contains. It describes Directory traversal execute permission, not the behavior that controls this Directory write and delete rights case. Assuming file write permission is sufficient for deletion leads to mistaken access analysis.
C:Octal permissions use bit sums read 4, write 2 and execute 1 within each class. It describes chmod octal mode 640, not the behavior that controls this Directory write and delete rights case. Assuming file write permission is sufficient for deletion leads to mistaken access analysis.
D:Unix groups provide a way to assign shared access to users and files. It describes groupadd new group, not the behavior that controls this Directory write and delete rights case. Assuming file write permission is sufficient for deletion leads to mistaken access analysis.
Question 425
A technician needs to find the configured default route and next-hop gateway. Which underlying Linux principle BEST explains the correct procedure for ip route show default gateway?
- ping tests ICMP reachability; lack of replies alone does not prove every network service is down.
- `host` is a DNS lookup utility rather than a packet reachability test.
- IP routes decide next-hop forwarding, distinct from DNS name lookup.
- Device nodes can represent disks and partitions; naming depends on driver and hardware.
Explanation
Correct Answer
C:IP routes decide next-hop forwarding, distinct from DNS name lookup. The procedure it justifies is to run `ip route show` and inspect the default route. This also allows checking that the routing table identifies the gateway or default route as applicable.
Incorrect Answers
A:Ping tests ICMP reachability; lack of replies alone does not prove every network service is down. It describes ping reachability testing, not the behavior that controls this ip route show default gateway case. Missing a default route can prevent off-subnet connectivity.
B:`host` is a DNS lookup utility rather than a packet reachability test. It describes host DNS name lookup, not the behavior that controls this ip route show default gateway case. Missing a default route can prevent off-subnet connectivity.
D:Device nodes can represent disks and partitions; naming depends on driver and hardware. It describes Linux block devices and partitions, not the behavior that controls this ip route show default gateway case. Missing a default route can prevent off-subnet connectivity.
Question 426
A backup job must preserve a directory tree in a .tar file. Which underlying Linux principle BEST explains the correct procedure for Creating a tar archive?
- bzip2 is a compression format distinct from gzip and xz.
- `tar -c` creates an archive and `-f` supplies its filename.
- ZIP combines archiving and compression in a widely supported container format.
- grep filters text lines by a pattern, rather than modifying the source file.
Explanation
Correct Answer
B:`tar -c` creates an archive and `-f` supplies its filename. The procedure it justifies is to run `tar -cf project.tar project/` to create an uncompressed archive. This also allows checking that the archive lists the intended files when inspected.
Incorrect Answers
A:Bzip2 is a compression format distinct from gzip and xz. It describes bzip2 compressed streams, not the behavior that controls this Creating a tar archive case. Compression is not automatically enabled by every tar archive creation.
C:ZIP combines archiving and compression in a widely supported container format. It describes ZIP archives and unzip, not the behavior that controls this Creating a tar archive case. Compression is not automatically enabled by every tar archive creation.
D:Grep filters text lines by a pattern, rather than modifying the source file. It describes grep fixed text matching, not the behavior that controls this Creating a tar archive case. Compression is not automatically enabled by every tar archive creation.
Question 427
A technician wants to find paths containing a known filename and accepts index freshness limitations. Which underlying Linux principle BEST explains the correct procedure for locate database lookup?
- Manual sections separate user commands from formats and other interfaces.
- A keyword manual search finds indexed descriptions, rather than opening a known page directly.
- `locate` searches a prebuilt file-name index rather than necessarily scanning the live filesystem.
- Recursive copying is required when copying a directory hierarchy with common cp implementations.
Explanation
Correct Answer
C:`locate` searches a prebuilt file-name index rather than necessarily scanning the live filesystem. The procedure it justifies is to use `locate filename` after ensuring its filename index is available and updated. This also allows checking that the command returns matching paths from its filename database.
Incorrect Answers
A:Manual sections separate user commands from formats and other interfaces. It describes Manual sections for commands and config, not the behavior that controls this locate database lookup case. Recently created files may be missing until the index is refreshed.
B:A keyword manual search finds indexed descriptions, rather than opening a known page directly. It describes Keyword manual search, not the behavior that controls this locate database lookup case. Recently created files may be missing until the index is refreshed.
D:Recursive copying is required when copying a directory hierarchy with common cp implementations. It describes cp -r directory trees, not the behavior that controls this locate database lookup case. Recently created files may be missing until the index is refreshed.
Question 428
A hardware technician maps USB peripherals to the main system board. Which underlying Linux principle BEST explains the correct procedure for Motherboard and peripherals?
- `/var/log` commonly contains variable log data on traditional Linux layouts.
- The PSU converts and distributes power to system components and must meet load needs.
- The motherboard provides electrical and communication pathways between system components.
- CPU executes instructions while RAM holds data and program state in use.
Explanation
Correct Answer
C:The motherboard provides electrical and communication pathways between system components. The procedure it justifies is to recognize the motherboard as the primary board interconnecting core components and peripherals. This also allows checking that component slots and buses connect through the board's interfaces.
Incorrect Answers
A:`/var/log` commonly contains variable log data on traditional Linux layouts. It describes /var/log system messages, not the behavior that controls this Motherboard and peripherals case. Confusing removable peripherals with the motherboard misstates system architecture.
B:The PSU converts and distributes power to system components and must meet load needs. It describes Power supply for components, not the behavior that controls this Motherboard and peripherals case. Confusing removable peripherals with the motherboard misstates system architecture.
D:CPU executes instructions while RAM holds data and program state in use. It describes CPU and RAM responsibilities, not the behavior that controls this Motherboard and peripherals case. Confusing removable peripherals with the motherboard misstates system architecture.
Question 429
A team moves a service onto an RPM-family host and must select compatible packages. Which underlying Linux principle BEST explains the correct procedure for Red Hat enterprise package family?
- LTS identifies an Ubuntu release designed for longer support than ordinary interim releases.
- Red Hat-family distributions commonly use RPM packages rather than Debian .deb packages.
- Unique secrets reduce credential-reuse exposure; MFA adds an independent verification factor.
- Linux distributions can run as guest systems in virtualized cloud infrastructure.
Explanation
Correct Answer
B:Red Hat-family distributions commonly use RPM packages rather than Debian .deb packages. The procedure it justifies is to use RPM-family packages and the distribution's supported DNF or YUM repository manager. This also allows checking that installed package metadata and repository updates show packages from the RPM-compatible ecosystem.
Incorrect Answers
A:LTS identifies an Ubuntu release designed for longer support than ordinary interim releases. It describes Ubuntu long-term support releases, not the behavior that controls this Red Hat enterprise package family case. Debian-only package tools do not implement the host's supported RPM repository workflow.
C:Unique secrets reduce credential-reuse exposure; MFA adds an independent verification factor. It describes Password manager and multifactor authentication, not the behavior that controls this Red Hat enterprise package family case. Debian-only package tools do not implement the host's supported RPM repository workflow.
D:Linux distributions can run as guest systems in virtualized cloud infrastructure. It describes Linux in hosted cloud systems, not the behavior that controls this Red Hat enterprise package family case. Debian-only package tools do not implement the host's supported RPM repository workflow.
Question 430
A team plans to move a Linux service from a local VM to a provider-managed VM. Which underlying Linux principle BEST explains the correct procedure for Linux in hosted cloud systems?
- Permissive licenses often permit proprietary incorporation while requiring specified notices.
- Red Hat-family distributions commonly use RPM packages rather than Debian .deb packages.
- Linux distributions can run as guest systems in virtualized cloud infrastructure.
- Raspberry Pi OS is a Debian-derived Linux distribution built for supported Raspberry Pi hardware.
Explanation
Correct Answer
C:Linux distributions can run as guest systems in virtualized cloud infrastructure. The procedure it justifies is to select a supported Linux distribution image for the cloud VM and configure its required applications. This also allows checking that the instance boots the chosen Linux image and serves the application after configuration.
Incorrect Answers
A:Permissive licenses often permit proprietary incorporation while requiring specified notices. It describes Permissive BSD-style licensing, not the behavior that controls this Linux in hosted cloud systems case. Confusing the hypervisor with the Linux guest leaves system administration responsibilities unclear.
B:Red Hat-family distributions commonly use RPM packages rather than Debian .deb packages. It describes Red Hat enterprise package family, not the behavior that controls this Linux in hosted cloud systems case. Confusing the hypervisor with the Linux guest leaves system administration responsibilities unclear.
D:Raspberry Pi OS is a Debian-derived Linux distribution built for supported Raspberry Pi hardware. It describes Raspberry Pi Linux deployment, not the behavior that controls this Linux in hosted cloud systems case. Confusing the hypervisor with the Linux guest leaves system administration responsibilities unclear.