Practice Exams:

LPI 101-500 Dumps

EXAM: LPIC-1 Exam 101
Verified By Experts
Premium Bundle
$40.00
$59.97 $99.97

101-500 Premium Bundle


  • Premium File 120 Questions & Answers
  • Training Course 126 Lectures
  • Study Guide 442 Pages

LPI 101-500 Practice Test 31

Question 300

An analyst expects a command to receive a literal asterisk but the shell expands it into filenames first. Which failure can follow if this control is ignored?

  1. Child programs may run with missing configuration even though the parent shell displays the variable correctly.
  2. Extra files can be processed or deleted because the shell matched a wider set than intended.
  3. The report may contain incorrect fields or silently omit empty values from its input.
  4. The planned batch job may terminate early and leave incomplete output.

Answer & Explanations

Correct answer: B

A.

This failure concerns another situation: A shell script starts a subprocess that cannot see a value assigned earlier in an interactive Bash session. The case here is: An analyst expects a command to receive a literal asterisk but the shell expands it into filenames first. The primary consequence is: Extra files can be processed or deleted because the shell matched a wider set than intended. The prevention is: Choose deliberate Bash glob patterns and quote characters that must be treated literally before passing arguments.

B.

Extra files can be processed or deleted because the shell matched a wider set than intended. This can follow from the shortcut: Assume the target command always interprets wildcard syntax instead of recognizing shell expansion. The protective action is: Choose deliberate Bash glob patterns and quote characters that must be treated literally before passing arguments. The case states: An analyst expects a command to receive a literal asterisk but the shell expands it into filenames first.

C.

This failure concerns another situation: A service report has colon-separated records and an analyst needs only the second field of each line. The case here is: An analyst expects a command to receive a literal asterisk but the shell expands it into filenames first. The primary consequence is: Extra files can be processed or deleted because the shell matched a wider set than intended. The prevention is: Choose deliberate Bash glob patterns and quote characters that must be treated literally before passing arguments.

D.

This failure concerns another situation: A remote backup process stops when an SSH session ends and the engineer needs a suitable persistent execution method. The case here is: An analyst expects a command to receive a literal asterisk but the shell expands it into filenames first. The primary consequence is: Extra files can be processed or deleted because the shell matched a wider set than intended. The prevention is: Choose deliberate Bash glob patterns and quote characters that must be treated literally before passing arguments.

Question 301

A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. Which Linux administration step most directly corrects this problem?

  1. Use systemctl get-default and set-default to choose the supported persistent systemd boot target after checking service dependencies.
  2. Inspect command -v or type and the PATH order, then invoke the reviewed executable by full path or update PATH intentionally.
  3. Use a recursive copy operation such as cp -R with reviewed source and destination paths.
  4. Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

Answer & Explanations

Correct answer: D

A.

This action fits another scenario: A headless Linux appliance unexpectedly starts a graphical desktop after a default target change. The stated scenario is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The appropriate response here is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

B.

This action fits another scenario: A technician installs a program under /opt/tools but invoking its short name still runs an older executable in /usr/bin. The stated scenario is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The appropriate response here is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

C.

This action fits another scenario: A project directory contains nested configuration files and an engineer must duplicate its full tree to a test location. The stated scenario is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The appropriate response here is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

D.

Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The scenario is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The technical reason is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

Question 302

A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The administrator proposes: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. Why would the recommended command or configuration resolve this problem?

  1. Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.
  2. uniq compares adjacent lines, so equal values must first be grouped when duplicates are separated in the input.
  3. Job control tracks foreground, background and stopped jobs associated with an interactive shell.
  4. nice influences a new process at launch; renice changes scheduling preference of an already running process.

Answer & Explanations

Correct answer: A

A.

Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended. That is why the appropriate action is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The stated problem is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log.

B.

This principle explains another scenario: An incident sample lists several recurring hostnames out of order and the team wants one entry per distinct name. The situation here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The controlling mechanism is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

C.

This principle explains another scenario: An interactive operator temporarily pauses a long-running text transformation and later needs it to continue. The situation here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The controlling mechanism is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

D.

This principle explains another scenario: A running batch calculation should be deprioritized after users begin a time-critical interactive session. The situation here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The controlling mechanism is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

Question 303

A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The administrator proposes: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. Which verification is most specifically tied to the original failure?

  1. Inspect df -h and df -i and demonstrate which resource changes after an approved cleanup of disposable test files.
  2. Generate one successful output line and one intentional error and confirm each appears only in its chosen file.
  3. Search in a copy, remove the verified line, save and compare the resulting document with the expected change.
  4. Modify a disposable file, save it and reopen it to verify the exact intended text persists.

Answer & Explanations

Correct answer: B

A.

This check is intended for another scenario: A web service cannot create a tiny cache file although the filesystem still reports many free gigabytes. The case here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The pertinent test is: Generate one successful output line and one intentional error and confirm each appears only in its chosen file.

B.

Generate one successful output line and one intentional error and confirm each appears only in its chosen file. This verifies the action: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The test applies to: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log.

C.

This check is intended for another scenario: An operator needs to locate one obsolete directive among many lines and remove it without affecting similar entries. The case here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The pertinent test is: Generate one successful output line and one intentional error and confirm each appears only in its chosen file.

D.

This check is intended for another scenario: A new administrator can navigate a configuration file in vi but typing does not insert text because normal mode is active. The case here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The pertinent test is: Generate one successful output line and one intentional error and confirm each appears only in its chosen file.

Question 304

A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. Which risky choice fails to address the actual Linux problem?

  1. Assign a strongly negative nice value to every batch task to make all background jobs finish quickly.
  2. Execute a numbered history entry with shell history expansion without first checking that it does not delete files.
  3. Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it.
  4. Extract an unreviewed archive directly over / with no inspection of contained paths or ownership.

Answer & Explanations

Correct answer: C

A.

This is a shortcut for another issue: A CPU-intensive indexer must run on a shared Linux server while interactive workloads retain reasonable responsiveness. The specific case is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. Here, avoid: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

B.

This is a shortcut for another issue: A junior engineer repeatedly guesses unfamiliar command flags from memory despite local manual pages describing exact usage. The specific case is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. Here, avoid: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

C.

Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. This is unsafe in: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The likely result is: A failure may be missed by operators because its error stream was never captured where expected. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

D.

This is a shortcut for another issue: A Linux application must be archived with nested configuration and metadata before a version migration. The specific case is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. Here, avoid: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

Question 305

A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. Which operational impact should the engineer expect if the gap remains?

  1. The planned batch job may terminate early and leave incomplete output.
  2. The report may contain incorrect fields or silently omit empty values from its input.
  3. A failure may be missed by operators because its error stream was never captured where expected.
  4. Valid but unrelated configuration entries may be rewritten and services can lose connectivity.

Answer & Explanations

Correct answer: C

A.

This failure concerns another situation: A remote backup process stops when an SSH session ends and the engineer needs a suitable persistent execution method. The case here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The primary consequence is: A failure may be missed by operators because its error stream was never captured where expected. The prevention is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

B.

This failure concerns another situation: A service report has colon-separated records and an analyst needs only the second field of each line. The case here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The primary consequence is: A failure may be missed by operators because its error stream was never captured where expected. The prevention is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

C.

A failure may be missed by operators because its error stream was never captured where expected. This can follow from the shortcut: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. The protective action is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The case states: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log.

D.

This failure concerns another situation: A config sample needs a known old hostname replaced with a new one while unrelated text must remain unchanged. The case here is: A nightly job must save normal command output while leaving failures visible in a separate diagnostic log. The primary consequence is: A failure may be missed by operators because its error stream was never captured where expected. The prevention is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

Question 306

A support engineer redirects a utility's stdout but its error messages still appear in the terminal. What is the most specific defensible operational intervention?

  1. Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.
  2. Use renice with the verified target PID and permitted new nice value to adjust an existing process.
  3. Choose deliberate Bash glob patterns and quote characters that must be treated literally before passing arguments.
  4. Use grep -E with a reviewed alternation expression to match either intended keyword.

Answer & Explanations

Correct answer: A

A.

Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The scenario is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The technical reason is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

B.

This action fits another scenario: A running batch calculation should be deprioritized after users begin a time-critical interactive session. The stated scenario is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The appropriate response here is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

C.

This action fits another scenario: A script uses a star wildcard and unintentionally selects backup files as well as current reports. The stated scenario is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The appropriate response here is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

D.

This action fits another scenario: A log review needs records containing either ERROR or FATAL but plain grep interprets a vertical-bar pattern literally. The stated scenario is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The appropriate response here is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

Question 307

A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The administrator proposes: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. Which causal relationship connects the diagnosis to the recommended step?

  1. Signals target specific process identities; an ambiguous name-based selection can affect several different workloads.
  2. The kernel ring buffer describes kernel activity while the systemd journal can associate boot messages with units and timestamps.
  3. Filesystems can exhaust available inodes independently of storage blocks, preventing new file creation.
  4. Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

Answer & Explanations

Correct answer: D

A.

This principle explains another scenario: A host has several similarly named application processes and only one worker must be restarted. The situation here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The controlling mechanism is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

B.

This principle explains another scenario: A workstation reboots during early service startup and the technician only checks a currently running application log. The situation here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The controlling mechanism is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

C.

This principle explains another scenario: A web service cannot create a tiny cache file although the filesystem still reports many free gigabytes. The situation here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The controlling mechanism is: Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended.

D.

Standard output and standard error are independent streams and require distinct redirection when separate destinations are intended. That is why the appropriate action is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The stated problem is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal.

Question 308

A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The administrator proposes: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. Which observation proves the intended Linux behavior has been restored?

  1. Create a sample filename with a space and newline and verify the consumer receives exactly one correct argument.
  2. Generate one successful output line and one intentional error and confirm each appears only in its chosen file.
  3. Inspect the new process NI value using ps or top and compare interactive responsiveness during a test workload.
  4. Run a small known input and verify matched lines are emitted while unrelated lines are excluded.

Answer & Explanations

Correct answer: B

A.

This check is intended for another scenario: A cleanup command consumes paths emitted by find, but some names contain spaces and newlines. The case here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The pertinent test is: Generate one successful output line and one intentional error and confirm each appears only in its chosen file.

B.

Generate one successful output line and one intentional error and confirm each appears only in its chosen file. This verifies the action: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The test applies to: A support engineer redirects a utility's stdout but its error messages still appear in the terminal.

C.

This check is intended for another scenario: A CPU-intensive indexer must run on a shared Linux server while interactive workloads retain reasonable responsiveness. The case here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The pertinent test is: Generate one successful output line and one intentional error and confirm each appears only in its chosen file.

D.

This check is intended for another scenario: An operator needs only matching error records from a command that emits hundreds of status lines. The case here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The pertinent test is: Generate one successful output line and one intentional error and confirm each appears only in its chosen file.

Question 309

A support engineer redirects a utility's stdout but its error messages still appear in the terminal. Which seemingly quick workaround should the administrator reject?

  1. Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it.
  2. Delete the system-provided executable immediately because a different directory was placed later in PATH.
  3. Manually modify one generated grub.cfg line and assume subsequent kernel upgrades will preserve the change.
  4. Use an unreviewed wildcard substitution directly on a production config file and assume it matches one hostname.

Answer & Explanations

Correct answer: A

A.

Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. This is unsafe in: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The likely result is: A failure may be missed by operators because its error stream was never captured where expected. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

B.

This is a shortcut for another issue: A technician installs a program under /opt/tools but invoking its short name still runs an older executable in /usr/bin. The specific case is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. Here, avoid: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

C.

This is a shortcut for another issue: A Linux administrator edits bootloader default settings but the generated GRUB menu still contains old kernel parameters. The specific case is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. Here, avoid: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

D.

This is a shortcut for another issue: A config sample needs a known old hostname replaced with a new one while unrelated text must remain unchanged. The specific case is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. Here, avoid: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. Instead: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

Question 310

A support engineer redirects a utility's stdout but its error messages still appear in the terminal. Which adverse result is most specifically linked to the uncorrected condition?

  1. The script may target the wrong files or refuse valid paths whenever names contain spaces or metacharacters.
  2. Duplicate operations can compete for resources or overwrite the same output.
  3. Active files or subdirectories may be erased along with the intended stale regular files.
  4. A failure may be missed by operators because its error stream was never captured where expected.

Answer & Explanations

Correct answer: D

A.

This failure concerns another situation: A maintenance script fails when a filename includes spaces because an unquoted variable expands into several command arguments. The case here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The primary consequence is: A failure may be missed by operators because its error stream was never captured where expected. The prevention is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

B.

This failure concerns another situation: An interactive operator temporarily pauses a long-running text transformation and later needs it to continue. The case here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The primary consequence is: A failure may be missed by operators because its error stream was never captured where expected. The prevention is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

C.

This failure concerns another situation: A backup directory contains stale regular files and live subdirectories that must be retained. The case here is: A support engineer redirects a utility's stdout but its error messages still appear in the terminal. The primary consequence is: A failure may be missed by operators because its error stream was never captured where expected. The prevention is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately.

D.

A failure may be missed by operators because its error stream was never captured where expected. This can follow from the shortcut: Redirect only file descriptor 1 and claim that all diagnostic errors were captured with it. The protective action is: Use explicit stdout and stderr file descriptors to route ordinary results and diagnostic messages separately. The case states: A support engineer redirects a utility's stdout but its error messages still appear in the terminal.

LPIC-1 Exam 101 (101-500) Practice Tests