LPI 010-160 Practice Test 90
Question 890
An automation runner checks a script's result and should stop after a fatal error. Select TWO statements that together form an appropriate implementation and validation plan.
- The caller can distinguish success and failure through the process exit status.
- Print an error message but always force zero status.
- Use `exit 0` for successful completion and a nonzero exit code for a failure.
- Use `exit 1` to indicate unequivocal success.
- Treat output color as the only machine-readable success signal.
Explanation
Correct Answers
A:The caller can distinguish success and failure through the process exit status. This provides direct evidence of the intended Exit code on script completion behavior.
C:Use `exit 0` for successful completion and a nonzero exit code for a failure. This is the actual implementation for Exit code on script completion.
Incorrect Answers
B:Print an error message but always force zero status. This does not contribute a sound implementation or validation step for Exit code on script completion. Returning success after a failed critical command can mislead later automation.
D:Use `exit 1` to indicate unequivocal success. This does not contribute a sound implementation or validation step for Exit code on script completion. Returning success after a failed critical command can mislead later automation.
E:Treat output color as the only machine-readable success signal. This does not contribute a sound implementation or validation step for Exit code on script completion. Returning success after a failed critical command can mislead later automation.
Question 891
A school evaluates an open-source application for handling student documents. Select THREE statements that together form an appropriate implementation and validation plan.
- Review application permissions, provenance, update policy and data-sharing settings.
- Assume public source code eliminates all software vulnerabilities.
- Grant every application full home-directory access by default.
- Installation consent and data-flow settings match the stated privacy needs.
- Source availability alone does not guarantee an application is secure or privacy-preserving.
- Disable security patches to stop unwanted network connections.
Explanation
Correct Answers
A:Review application permissions, provenance, update policy and data-sharing settings. This is the actual implementation for Privacy-conscious software selection.
D:Installation consent and data-flow settings match the stated privacy needs. This provides direct evidence of the intended Privacy-conscious software selection behavior.
E:Source availability alone does not guarantee an application is secure or privacy-preserving. This is the governing technical reason for the chosen solution.
Incorrect Answers
B:Assume public source code eliminates all software vulnerabilities. This does not contribute a sound implementation or validation step for Privacy-conscious software selection. Installing untrusted code without reviewing access can expose files.
C:Grant every application full home-directory access by default. This does not contribute a sound implementation or validation step for Privacy-conscious software selection. Installing untrusted code without reviewing access can expose files.
F:Disable security patches to stop unwanted network connections. This does not contribute a sound implementation or validation step for Privacy-conscious software selection. Installing untrusted code without reviewing access can expose files.
Question 892
A log file has many lines and a student wants those containing the text ERROR. Select THREE statements that together form an appropriate implementation and validation plan.
- grep filters text lines by a pattern, rather than modifying the source file.
- Run `grep 'ERROR' logfile` or the matching fixed-text pattern.
- Use `head logfile` as a comprehensive keyword search.
- Run `wc -l logfile` expecting the matching contents.
- Use `sort logfile` expecting it to filter ERROR lines.
- Only lines containing the requested pattern appear in the output.
Explanation
Correct Answers
A:Grep filters text lines by a pattern, rather than modifying the source file. This is the governing technical reason for the chosen solution.
B:Run `grep 'ERROR' logfile` or the matching fixed-text pattern. This is the actual implementation for grep fixed text matching.
F:Only lines containing the requested pattern appear in the output. This provides direct evidence of the intended grep fixed text matching behavior.
Incorrect Answers
C:Use `head logfile` as a comprehensive keyword search. This does not contribute a sound implementation or validation step for grep fixed text matching. Viewing the entire file does not isolate matching records.
D:Run `wc -l logfile` expecting the matching contents. This does not contribute a sound implementation or validation step for grep fixed text matching. Viewing the entire file does not isolate matching records.
E:Use `sort logfile` expecting it to filter ERROR lines. This does not contribute a sound implementation or validation step for grep fixed text matching. Viewing the entire file does not isolate matching records.
Question 893
A diagnostic file mixes `warning`, `Warning` and `WARNING`. Select TWO statements that together form an appropriate implementation and validation plan.
- Use `sort -r` as grep's case-insensitive option.
- Rename all logfiles to lowercase to perform a search.
- Lines with the term in different letter cases are selected.
- Run `grep -i warning file` for a case-insensitive match.
- Run `grep -v warning` expecting to ignore case.
Explanation
Correct Answers
C:Lines with the term in different letter cases are selected. This provides direct evidence of the intended grep -i ignore case behavior.
D:Run `grep -i warning file` for a case-insensitive match. This is the actual implementation for grep -i ignore case.
Incorrect Answers
A:Use `sort -r` as grep's case-insensitive option. This does not contribute a sound implementation or validation step for grep -i ignore case. A case-sensitive search can miss variants of a keyword.
B:Rename all logfiles to lowercase to perform a search. This does not contribute a sound implementation or validation step for grep -i ignore case. A case-sensitive search can miss variants of a keyword.
E:Run `grep -v warning` expecting to ignore case. This does not contribute a sound implementation or validation step for grep -i ignore case. A case-sensitive search can miss variants of a keyword.
Question 894
A USB adapter fails to initialize and the operator needs recent kernel diagnostics. Select TWO statements that together form an appropriate implementation and validation plan.
- Query `dmesg` when permitted to read the kernel message buffer.
- Expect `ls` to decode all kernel driver diagnostics.
- Kernel diagnostics relevant to device detection are displayed.
- Use `passwd` to print kernel message history.
- Run `wc -c` as the sole kernel message viewer.
Explanation
Correct Answers
A:Query `dmesg` when permitted to read the kernel message buffer. This is the actual implementation for dmesg kernel messages.
C:Kernel diagnostics relevant to device detection are displayed. This provides direct evidence of the intended dmesg kernel messages behavior.
Incorrect Answers
B:Expect `ls` to decode all kernel driver diagnostics. This does not contribute a sound implementation or validation step for dmesg kernel messages. Reading only web-server logs can miss hardware detection errors.
D:Use `passwd` to print kernel message history. This does not contribute a sound implementation or validation step for dmesg kernel messages. Reading only web-server logs can miss hardware detection errors.
E:Run `wc -c` as the sole kernel message viewer. This does not contribute a sound implementation or validation step for dmesg kernel messages. Reading only web-server logs can miss hardware detection errors.
Question 895
A trainee needs information about current kernel process state. Select TWO statements that together form an appropriate implementation and validation plan.
- Inspect virtual entries under `/proc` for current kernel and process information.
- Store application reports permanently in `/proc`.
- Treat `/proc` as an ordinary photo directory.
- A process-specific directory or kernel information file reflects the running system.
- Expect every `/proc` entry to be a static document from installation.
Explanation
Correct Answers
A:Inspect virtual entries under `/proc` for current kernel and process information. This is the actual implementation for /proc virtual process information.
D:A process-specific directory or kernel information file reflects the running system. This provides direct evidence of the intended /proc virtual process information behavior.
Incorrect Answers
B:Store application reports permanently in `/proc`. This does not contribute a sound implementation or validation step for /proc virtual process information. Treating procfs entries as permanent backups can give misleading results.
C:Treat `/proc` as an ordinary photo directory. This does not contribute a sound implementation or validation step for /proc virtual process information. Treating procfs entries as permanent backups can give misleading results.
E:Expect every `/proc` entry to be a static document from installation. This does not contribute a sound implementation or validation step for /proc virtual process information. Treating procfs entries as permanent backups can give misleading results.
Question 896
A standard user is permitted to install an OS update without logging in directly as root. Select TWO statements that together form an appropriate implementation and validation plan.
- Run any ordinary command and assume it implicitly becomes root.
- Change file extensions to bypass the sudoers policy.
- The intended privileged action succeeds only for an authorized operator.
- Execute the approved command with `sudo` under applicable sudoers authorization.
- Share the root password with all staff as the first choice.
Explanation
Correct Answers
C:The intended privileged action succeeds only for an authorized operator. This provides direct evidence of the intended sudo authorized privilege elevation behavior.
D:Execute the approved command with `sudo` under applicable sudoers authorization. This is the actual implementation for sudo authorized privilege elevation.
Incorrect Answers
A:Run any ordinary command and assume it implicitly becomes root. This does not contribute a sound implementation or validation step for sudo authorized privilege elevation. Lack of sudo permission is not fixed by adding a shell alias alone.
B:Change file extensions to bypass the sudoers policy. This does not contribute a sound implementation or validation step for sudo authorized privilege elevation. Lack of sudo permission is not fixed by adding a shell alias alone.
E:Share the root password with all staff as the first choice. This does not contribute a sound implementation or validation step for sudo authorized privilege elevation. Lack of sudo permission is not fixed by adding a shell alias alone.
Question 897
A trainee tries to change a system service but receives a permission error as an ordinary user. Select TWO statements that together form an appropriate implementation and validation plan.
- Assume all Linux accounts have identical privileges.
- Disable permissions on the system's configuration files.
- Give every new user UID 0 to avoid permission prompts.
- Ordinary file access is limited while privileged operations require explicit authorization.
- Use a standard account for routine work and elevate only for authorized administrative tasks.
Explanation
Correct Answers
D:Ordinary file access is limited while privileged operations require explicit authorization. This provides direct evidence of the intended Root versus ordinary users behavior.
E:Use a standard account for routine work and elevate only for authorized administrative tasks. This is the actual implementation for Root versus ordinary users.
Incorrect Answers
A:Assume all Linux accounts have identical privileges. This does not contribute a sound implementation or validation step for Root versus ordinary users. Running all applications as root increases the impact of mistakes and compromise.
B:Disable permissions on the system's configuration files. This does not contribute a sound implementation or validation step for Root versus ordinary users. Running all applications as root increases the impact of mistakes and compromise.
C:Give every new user UID 0 to avoid permission prompts. This does not contribute a sound implementation or validation step for Root versus ordinary users. Running all applications as root increases the impact of mistakes and compromise.
Question 898
A colleague sends a `.bz2`-compressed text file that needs decompression. Select TWO statements that together form an appropriate implementation and validation plan.
- The decompressed file matches the original content.
- Use `bzip2` to compress and `bunzip2` or `bzip2 -d` to decompress.
- Run `unzip` on every .bz2 stream expecting ZIP entries.
- Rename the suffix to .gz without recompressing.
- Run `gunzip` as the guaranteed decoder for arbitrary .bz2 data.
Explanation
Correct Answers
A:The decompressed file matches the original content. This provides direct evidence of the intended bzip2 compressed streams behavior.
B:Use `bzip2` to compress and `bunzip2` or `bzip2 -d` to decompress. This is the actual implementation for bzip2 compressed streams.
Incorrect Answers
C:Run `unzip` on every .bz2 stream expecting ZIP entries. This does not contribute a sound implementation or validation step for bzip2 compressed streams. Sending bzip2 data to an unrelated decompressor can cause format errors.
D:Rename the suffix to .gz without recompressing. This does not contribute a sound implementation or validation step for bzip2 compressed streams. Sending bzip2 data to an unrelated decompressor can cause format errors.
E:Run `gunzip` as the guaranteed decoder for arbitrary .bz2 data. This does not contribute a sound implementation or validation step for bzip2 compressed streams. Sending bzip2 data to an unrelated decompressor can cause format errors.
Question 899
A school wants a stable Linux lab image with predictable security maintenance over several years. Select TWO statements that together form an appropriate implementation and validation plan.
- The selected release has an explicit extended maintenance window rather than only a short interim lifecycle.
- Assume every Ubuntu daily development image has the same support term.
- Disable update repositories after initial installation.
- Choose an Ubuntu LTS release and check its supported maintenance dates.
- Treat a beta release as an automatic long-term support guarantee.
Explanation
Correct Answers
A:The selected release has an explicit extended maintenance window rather than only a short interim lifecycle. This provides direct evidence of the intended Ubuntu long-term support releases behavior.
D:Choose an Ubuntu LTS release and check its supported maintenance dates. This is the actual implementation for Ubuntu long-term support releases.
Incorrect Answers
B:Assume every Ubuntu daily development image has the same support term. This does not contribute a sound implementation or validation step for Ubuntu long-term support releases. Choosing an unsupported short-lived release can stop routine security updates.
C:Disable update repositories after initial installation. This does not contribute a sound implementation or validation step for Ubuntu long-term support releases. Choosing an unsupported short-lived release can stop routine security updates.
E:Treat a beta release as an automatic long-term support guarantee. This does not contribute a sound implementation or validation step for Ubuntu long-term support releases. Choosing an unsupported short-lived release can stop routine security updates.
Question 900
A student sets `course=linux` in Bash and wants to print its value. Select TWO statements that together form an appropriate implementation and validation plan.
- Expand the variable with `$` such as `echo "$course"`.
- Use `echo %course%` as Bash parameter expansion.
- Write `course = linux` as a valid Bash scalar assignment.
- The printed output reflects the variable's stored value.
- Type `echo course` and expect it to expand the variable.
Explanation
Correct Answers
A:Expand the variable with `$` such as `echo "$course"`. This is the actual implementation for echo and shell variables.
D:The printed output reflects the variable's stored value. This provides direct evidence of the intended echo and shell variables behavior.
Incorrect Answers
B:Use `echo %course%` as Bash parameter expansion. This does not contribute a sound implementation or validation step for echo and shell variables. Printing the unexpanded identifier does not display its value.
C:Write `course = linux` as a valid Bash scalar assignment. This does not contribute a sound implementation or validation step for echo and shell variables. Printing the unexpanded identifier does not display its value.
E:Type `echo course` and expect it to expand the variable. This does not contribute a sound implementation or validation step for echo and shell variables. Printing the unexpanded identifier does not display its value.