LPI 010-160 Practice Test 54
Question 530
A student needs to link to a target without duplicating its file contents. Which underlying Linux principle BEST explains the correct procedure for Symbolic links with ln -s?
- Unix groups provide a way to assign shared access to users and files.
- A symbolic link stores a path reference and can point across filesystems.
- Both are temporary-file locations, with cleanup lifetime dependent on system policy.
- Symbolic links can dangle when their targets are removed or relocated.
Explanation
Correct Answer
B:A symbolic link stores a path reference and can point across filesystems. The procedure it justifies is to run `ln -s target linkname` to create a symbolic link. This also allows checking that the link resolves to the target when the path is valid.
Incorrect Answers
A:Unix groups provide a way to assign shared access to users and files. It describes groupadd new group, not the behavior that controls this Symbolic links with ln -s case. Copying the file creates an independent data copy rather than a path link.
C:Both are temporary-file locations, with cleanup lifetime dependent on system policy. It describes /tmp and /var/tmp retention, not the behavior that controls this Symbolic links with ln -s case. Copying the file creates an independent data copy rather than a path link.
D:Symbolic links can dangle when their targets are removed or relocated. It describes Dangling symbolic links, not the behavior that controls this Symbolic links with ln -s case. Copying the file creates an independent data copy rather than a path link.
Question 531
A class needs to run a newly created shell script directly from its directory. Which underlying Linux principle BEST explains the correct procedure for Script execute permission?
- A pathname glob can supply the loop's items while quoted variable expansion preserves each filename.
- Executable permission and interpreter availability are relevant to direct script invocation.
- `tar -x` extracts an archive and should be used with a supplied file.
- A `for` loop assigns successive list items to the loop variable.
Explanation
Correct Answer
B:Executable permission and interpreter availability are relevant to direct script invocation. The procedure it justifies is to mark the script executable with `chmod +x backup.sh` and use `./backup.sh`. This also allows checking that the script runs when invoked directly by a permitted user.
Incorrect Answers
A:A pathname glob can supply the loop's items while quoted variable expansion preserves each filename. It describes Loop over matching filenames, not the behavior that controls this Script execute permission case. A readable but non-executable script may require explicit interpreter invocation.
C:`tar -x` extracts an archive and should be used with a supplied file. It describes Extracting a tar archive, not the behavior that controls this Script execute permission case. A readable but non-executable script may require explicit interpreter invocation.
D:A `for` loop assigns successive list items to the loop variable. It describes Loop over fixed items, not the behavior that controls this Script execute permission case. A readable but non-executable script may require explicit interpreter invocation.
Question 532
A team must distinguish world-writable directory access from unrestricted unlinking. Which underlying Linux principle BEST explains the correct procedure for Sticky bit shared directories?
- `/etc/skel` is a template directory for new home directories, not a live shared home.
- Both are temporary-file locations, with cleanup lifetime dependent on system policy.
- A symbolic link stores a path reference and can point across filesystems.
- Directory sticky bit restricts deletion and renaming in shared writable directories.
Explanation
Correct Answer
D:Directory sticky bit restricts deletion and renaming in shared writable directories. The procedure it justifies is to apply a sticky bit to the shared directory while maintaining required write permissions. This also allows checking that users can create their own files but cannot freely remove other users' entries under the sticky-bit rule.
Incorrect Answers
A:`/etc/skel` is a template directory for new home directories, not a live shared home. It describes /etc/skel new home templates, not the behavior that controls this Sticky bit shared directories case. A world-writable directory without a sticky bit permits unwanted cross-user deletion.
B:Both are temporary-file locations, with cleanup lifetime dependent on system policy. It describes /tmp and /var/tmp retention, not the behavior that controls this Sticky bit shared directories case. A world-writable directory without a sticky bit permits unwanted cross-user deletion.
C:A symbolic link stores a path reference and can point across filesystems. It describes Symbolic links with ln -s, not the behavior that controls this Sticky bit shared directories case. A world-writable directory without a sticky bit permits unwanted cross-user deletion.
Question 533
A researcher needs to archive and compress nested files in one tar invocation. Which underlying Linux principle BEST explains the correct procedure for tar gzip combined compression?
- The tar `-z` option requests gzip compression while `-c` creates the archive.
- `sort` orders lines while other tools filter or count them.
- xz is a specific compressed-stream format and requires a matching decompression algorithm.
- bzip2 is a compression format distinct from gzip and xz.
Explanation
Correct Answer
A:The tar `-z` option requests gzip compression while `-c` creates the archive. The procedure it justifies is to run `tar -czf project.tar.gz project/` to create gzip-compressed tar. This also allows checking that the resulting archive extracts with `tar -xzf` and contains the original hierarchy.
Incorrect Answers
B:`sort` orders lines while other tools filter or count them. It describes sort text records, not the behavior that controls this tar gzip combined compression case. Missing compression leaves an uncompressed tar despite a .gz-looking filename.
C:Xz is a specific compressed-stream format and requires a matching decompression algorithm. It describes xz compression tools, not the behavior that controls this tar gzip combined compression case. Missing compression leaves an uncompressed tar despite a .gz-looking filename.
D:Bzip2 is a compression format distinct from gzip and xz. It describes bzip2 compressed streams, not the behavior that controls this tar gzip combined compression case. Missing compression leaves an uncompressed tar despite a .gz-looking filename.
Question 534
A text analyst needs to find matching terms regardless of capitalization. Which underlying Linux principle BEST explains the correct procedure for grep -i ignore case?
- grep filters text lines by a pattern, rather than modifying the source file.
- `head` selects beginning lines and `tail` selects ending lines.
- The `-i` option makes grep ignore case distinctions in matching.
- xz is a specific compressed-stream format and requires a matching decompression algorithm.
Explanation
Correct Answer
C:The `-i` option makes grep ignore case distinctions in matching. The procedure it justifies is to run `grep -i warning file` for a case-insensitive match. This also allows checking that lines with the term in different letter cases are selected.
Incorrect Answers
A: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 grep -i ignore case case. A case-sensitive search can miss variants of a keyword.
B:`head` selects beginning lines and `tail` selects ending lines. It describes head and tail line selection, not the behavior that controls this grep -i ignore case case. A case-sensitive search can miss variants of a keyword.
D:Xz is a specific compressed-stream format and requires a matching decompression algorithm. It describes xz compression tools, not the behavior that controls this grep -i ignore case case. A case-sensitive search can miss variants of a keyword.
Question 535
A colleague asks how to restore a file ending `.gz` to ordinary text. Which underlying Linux principle BEST explains the correct procedure for gzip compression and gunzip?
- `tar -x` extracts an archive and should be used with a supplied file.
- The tar `-z` option requests gzip compression while `-c` creates the archive.
- gzip compresses a stream or file and does not by itself preserve multiple filenames in one archive.
- Spaces around `=` split a Bash assignment into command words.
Explanation
Correct Answer
C:Gzip compresses a stream or file and does not by itself preserve multiple filenames in one archive. The procedure it justifies is to compress with `gzip` and decompress with `gunzip` for the single file. This also allows checking that a gzip file can be decompressed to recover its original bytes.
Incorrect Answers
A:`tar -x` extracts an archive and should be used with a supplied file. It describes Extracting a tar archive, not the behavior that controls this gzip compression and gunzip case. Treating gzip alone as a directory archiver is incorrect.
B:The tar `-z` option requests gzip compression while `-c` creates the archive. It describes tar gzip combined compression, not the behavior that controls this gzip compression and gunzip case. Treating gzip alone as a directory archiver is incorrect.
D:Spaces around `=` split a Bash assignment into command words. It describes Bash variable assignment syntax, not the behavior that controls this gzip compression and gunzip case. Treating gzip alone as a directory archiver is incorrect.
Question 536
An organization deploys many desktops and prioritizes a documented long-term Ubuntu maintenance cycle. Which underlying Linux principle BEST explains the correct procedure for Ubuntu long-term support releases?
- LTS identifies an Ubuntu release designed for longer support than ordinary interim releases.
- Linux distributions can run as guest systems in virtualized cloud infrastructure.
- Red Hat-family distributions commonly use RPM packages rather than Debian .deb packages.
- Virtualization lets multiple guest operating systems share a physical host via a hypervisor.
Explanation
Correct Answer
A:LTS identifies an Ubuntu release designed for longer support than ordinary interim releases. The procedure it justifies is to choose an Ubuntu LTS release and check its supported maintenance dates. This also allows checking that the selected release has an explicit extended maintenance window rather than only a short interim lifecycle.
Incorrect Answers
B:Linux distributions can run as guest systems in virtualized cloud infrastructure. It describes Linux in hosted cloud systems, not the behavior that controls this Ubuntu long-term support releases case. Choosing an unsupported short-lived release can stop routine security updates.
C: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 Ubuntu long-term support releases case. Choosing an unsupported short-lived release can stop routine security updates.
D:Virtualization lets multiple guest operating systems share a physical host via a hypervisor. It describes Local virtualization and guest operating systems, not the behavior that controls this Ubuntu long-term support releases case. Choosing an unsupported short-lived release can stop routine security updates.
Question 537
A class asks which simple command displays a list of earlier interactive commands. Which underlying Linux principle BEST explains the correct procedure for Shell history recall?
- PATH is a colon-separated list of directories the shell searches for command names.
- Shell history is separate from filesystem directory contents.
- `mv` renames or relocates filesystem objects rather than duplicating them.
- Unquoted variable names in an echo command are literal text, while `$name` expands a shell parameter.
Explanation
Correct Answer
B:Shell history is separate from filesystem directory contents. The procedure it justifies is to run `history` in an interactive Bash shell. This also allows checking that a numbered command list from the current shell history is displayed.
Incorrect Answers
A:PATH is a colon-separated list of directories the shell searches for command names. It describes PATH and command discovery, not the behavior that controls this Shell history recall case. Listing `/var/log` is not equivalent to the user's current history list.
C:`mv` renames or relocates filesystem objects rather than duplicating them. It describes mv rename and relocation, not the behavior that controls this Shell history recall case. Listing `/var/log` is not equivalent to the user's current history list.
D:Unquoted variable names in an echo command are literal text, while `$name` expands a shell parameter. It describes echo and shell variables, not the behavior that controls this Shell history recall case. Listing `/var/log` is not equivalent to the user's current history list.
Question 538
A user asks where many application and service configuration directories reside. Which underlying Linux principle BEST explains the correct procedure for /etc configuration files?
- `/var/log` commonly contains variable log data on traditional Linux layouts.
- `/etc` commonly stores host-specific system configuration, not arbitrary user documents.
- Device nodes are interfaces to devices rather than conventional documentation files.
- DNS converts names into addresses and is separate from IP routing.
Explanation
Correct Answer
B:`/etc` commonly stores host-specific system configuration, not arbitrary user documents. The procedure it justifies is to inspect `/etc` and the service's documented configuration path. This also allows checking that the selected service configuration file is present under the expected directory.
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 /etc configuration files case. Editing data in `/dev` does not replace system configuration files.
C:Device nodes are interfaces to devices rather than conventional documentation files. It describes /dev device nodes, not the behavior that controls this /etc configuration files case. Editing data in `/dev` does not replace system configuration files.
D:DNS converts names into addresses and is separate from IP routing. It describes DNS resolver configuration, not the behavior that controls this /etc configuration files case. Editing data in `/dev` does not replace system configuration files.
Question 539
A script copies a file whose path contains spaces. Which underlying Linux principle BEST explains the correct procedure for Escaping spaces in shell paths?
- Unquoted whitespace can split one intended argument into several tokens.
- PATH is a colon-separated list of directories the shell searches for command names.
- Shell tilde expansion and bare `cd` provide convenient home-directory navigation.
- Shell history is separate from filesystem directory contents.
Explanation
Correct Answer
A:Unquoted whitespace can split one intended argument into several tokens. The procedure it justifies is to quote the entire path or escape its spaces, for example `cd "Project Files"`. This also allows checking that the shell treats the spaced name as one pathname instead of multiple words.
Incorrect Answers
B:PATH is a colon-separated list of directories the shell searches for command names. It describes PATH and command discovery, not the behavior that controls this Escaping spaces in shell paths case. An unquoted spaced path is split into separate words and may make the command act on the wrong target.
C:Shell tilde expansion and bare `cd` provide convenient home-directory navigation. It describes Home directory shorthand, not the behavior that controls this Escaping spaces in shell paths case. An unquoted spaced path is split into separate words and may make the command act on the wrong target.
D:Shell history is separate from filesystem directory contents. It describes Shell history recall, not the behavior that controls this Escaping spaces in shell paths case. An unquoted spaced path is split into separate words and may make the command act on the wrong target.
Question 540
A laboratory compares mechanical hard drives with solid-state storage. Which underlying Linux principle BEST explains the correct procedure for SSD versus rotational disk?
- SSDs store data without mechanical moving heads while HDDs use rotating media.
- CPU executes instructions while RAM holds data and program state in use.
- top provides interactive periodically refreshed process information.
- The motherboard provides electrical and communication pathways between system components.
Explanation
Correct Answer
A:SSDs store data without mechanical moving heads while HDDs use rotating media. The procedure it justifies is to select SSD storage where lower seek latency and random I/O are important. This also allows checking that read and write tests show storage performance consistent with the selected medium.
Incorrect Answers
B:CPU executes instructions while RAM holds data and program state in use. It describes CPU and RAM responsibilities, not the behavior that controls this SSD versus rotational disk case. Confusing storage access time with CPU clock rate misdiagnoses delays.
C:Top provides interactive periodically refreshed process information. It describes top interactive process monitor, not the behavior that controls this SSD versus rotational disk case. Confusing storage access time with CPU clock rate misdiagnoses delays.
D:The motherboard provides electrical and communication pathways between system components. It describes Motherboard and peripherals, not the behavior that controls this SSD versus rotational disk case. Confusing storage access time with CPU clock rate misdiagnoses delays.