- Home
- Lpi Certification
- 010-160 Exam
- Lpi.010-160.v2026-11-11.q101 Practice Test
Question 31
Which of the following commands sorts the output of the command export-logs?
Correct Answer: D
The sort command is used to sort the lines of a text file or the output of another command in alphabetical, numerical, or other order. The sort command has the following syntax: sort [options] [file...]. The file argument is the name of one or more files to be sorted. If no file is given, the sort command reads from the standard input, which is usually the keyboard or the output of another command.
The | (pipe) symbol is used to connect the output of one command to the input of another command. This allows the creation of pipelines of commands that process data sequentially. The pipe symbol has the following syntax: command1 | command2. The command1 argument is the name of the first command, whose output is sent to the input of the second command. The command2 argument is the name of the second command, which receives the output of the first command as its input.
Therefore, the command export-logs | sort sorts the output of the export-logs command in alphabetical order. The export-logs command is assumed to be a custom command that exports some logs to the standard output. The sort command receives the output of the export-logs command as its input and sorts it according to the default criteria, which is the first character of each line. The sorted output is then displayed on the screen or can be redirected to a file or another command.
The other options in the question are incorrect because they use the wrong symbols to connect the commands. The < (input redirection) symbol is used to read the input of a command from a file instead of the keyboard. The > (output redirection) symbol is used to write the output of a command to a file instead of the screen. The & (background) symbol is used to run a command in the background, which means the command does not wait for user input and allows the user to run other commands simultaneously. The <> (bidirectional redirection) symbol is used to read and write the input and output of a command from and to the same file. None of these symbols can be used to sort the output of the export-logs command. Reference:
Linux Essentials Version 1.6 Objectives: 3.2. Searching and Extracting Data from Files1 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Chapter 9. The Power of the Command Line - 9.2. Searching and Extracting Data from Files - 9.2.1. The sort Command2 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Chapter 9. The Power of the Command Line - 9.3. Turning Commands into a Script - 9.3.1. Pipes and Redirection2 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Appendix A. Answers to the Exercises - Chapter 9. The Power of the Command Line - 9.2. Searching and Extracting Data from Files - Exercise 9.2.12 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Appendix A. Answers to the Exercises - Chapter 9. The Power of the Command Line - 9.3. Turning Commands into a Script - Exercise 9.3.12
The | (pipe) symbol is used to connect the output of one command to the input of another command. This allows the creation of pipelines of commands that process data sequentially. The pipe symbol has the following syntax: command1 | command2. The command1 argument is the name of the first command, whose output is sent to the input of the second command. The command2 argument is the name of the second command, which receives the output of the first command as its input.
Therefore, the command export-logs | sort sorts the output of the export-logs command in alphabetical order. The export-logs command is assumed to be a custom command that exports some logs to the standard output. The sort command receives the output of the export-logs command as its input and sorts it according to the default criteria, which is the first character of each line. The sorted output is then displayed on the screen or can be redirected to a file or another command.
The other options in the question are incorrect because they use the wrong symbols to connect the commands. The < (input redirection) symbol is used to read the input of a command from a file instead of the keyboard. The > (output redirection) symbol is used to write the output of a command to a file instead of the screen. The & (background) symbol is used to run a command in the background, which means the command does not wait for user input and allows the user to run other commands simultaneously. The <> (bidirectional redirection) symbol is used to read and write the input and output of a command from and to the same file. None of these symbols can be used to sort the output of the export-logs command. Reference:
Linux Essentials Version 1.6 Objectives: 3.2. Searching and Extracting Data from Files1 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Chapter 9. The Power of the Command Line - 9.2. Searching and Extracting Data from Files - 9.2.1. The sort Command2 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Chapter 9. The Power of the Command Line - 9.3. Turning Commands into a Script - 9.3.1. Pipes and Redirection2 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Appendix A. Answers to the Exercises - Chapter 9. The Power of the Command Line - 9.2. Searching and Extracting Data from Files - Exercise 9.2.12 Linux Essentials Version 1.6 Exam Study Resources: Linux Essentials Manual - Appendix A. Answers to the Exercises - Chapter 9. The Power of the Command Line - 9.3. Turning Commands into a Script - Exercise 9.3.12
Question 32
What is true about the owner of a file?
Correct Answer: A
In Linux, every file and directory is associated with an owner and a group. The owner is the user who created the file or directory, and the group is the group to which the owner belongs. Therefore, each file is owned by exactly one user and one group. This is true for option A. The other options are false for the following reasons:
Option B: The owner of a file does not always have full permissions when accessing the file. The permissions are determined by the file mode, which can be changed by the owner or the root user. The file mode specifies the read, write, and execute permissions for the owner, the group, and others. The owner can have different permissions than the group or others.
Option C: The user owning a file does not have to be a member of the file's group. The owner can change the group ownership of the file to any group on the system, regardless of whether the owner belongs to that group or not. However, only the root user or a user with the CAP_CHOWN capability can change the group ownership to a group that the owner is not a member of.
Option D: When a user is deleted, all files owned by the user do not disappear. The files remain on the system, but their owner is changed to an invalid user ID (UID). The files can still be accessed by the group or others, depending on the permissions. The files can also be reclaimed by the root user or a user with the CAP_CHOWN capability, who can change the owner to a valid user.
Option E: The owner of a file can be changed once it is assigned to an owner. The owner can transfer the ownership to another user, or the root user or a user with the CAP_CHOWN capability can change the owner to any user on the system. The command to change the owner of a file is chown. Reference: 1: Chown Command in Linux (File Ownership) | Linuxize 2 3: Linux File Permissions and Ownership Explained with Examples 4 2: 3 Ways to Find File Owner in Linux - howtouselinux 1
Option B: The owner of a file does not always have full permissions when accessing the file. The permissions are determined by the file mode, which can be changed by the owner or the root user. The file mode specifies the read, write, and execute permissions for the owner, the group, and others. The owner can have different permissions than the group or others.
Option C: The user owning a file does not have to be a member of the file's group. The owner can change the group ownership of the file to any group on the system, regardless of whether the owner belongs to that group or not. However, only the root user or a user with the CAP_CHOWN capability can change the group ownership to a group that the owner is not a member of.
Option D: When a user is deleted, all files owned by the user do not disappear. The files remain on the system, but their owner is changed to an invalid user ID (UID). The files can still be accessed by the group or others, depending on the permissions. The files can also be reclaimed by the root user or a user with the CAP_CHOWN capability, who can change the owner to a valid user.
Option E: The owner of a file can be changed once it is assigned to an owner. The owner can transfer the ownership to another user, or the root user or a user with the CAP_CHOWN capability can change the owner to any user on the system. The command to change the owner of a file is chown. Reference: 1: Chown Command in Linux (File Ownership) | Linuxize 2 3: Linux File Permissions and Ownership Explained with Examples 4 2: 3 Ways to Find File Owner in Linux - howtouselinux 1
Question 33
Which of the following commands are used to get information on the proper use of ls? (Choose two.)
Correct Answer: A,B
Question 34
What is the UID of the user root?
Correct Answer: E
Explanation
The UID of the user root is always 0 on Linux systems. This is because the kernel uses the UID 0 to check for the superuser privileges and grant access to all system resources. The name of the user account with UID 0 is usually root, but it can be changed or have aliases. However, some applications may expect the name root and not work properly with a different name. The UID 0 is reserved for the root user and cannot be assigned to any other user. The UID 0 is stored in the /etc/passwd file along with other user information. References:
* Linux Essentials Topic 104: The Linux Operating System, section 104.4: Runlevels and Boot Targets.
* Linux Essentials Topic 106: Security and File Permissions, section 106.1: Basic security and identifying user types.
* Linux Essentials Topic 106: Security and File Permissions, section 106.2: Creating users and groups.
The UID of the user root is always 0 on Linux systems. This is because the kernel uses the UID 0 to check for the superuser privileges and grant access to all system resources. The name of the user account with UID 0 is usually root, but it can be changed or have aliases. However, some applications may expect the name root and not work properly with a different name. The UID 0 is reserved for the root user and cannot be assigned to any other user. The UID 0 is stored in the /etc/passwd file along with other user information. References:
* Linux Essentials Topic 104: The Linux Operating System, section 104.4: Runlevels and Boot Targets.
* Linux Essentials Topic 106: Security and File Permissions, section 106.1: Basic security and identifying user types.
* Linux Essentials Topic 106: Security and File Permissions, section 106.2: Creating users and groups.
Question 35
Why are web browser cookies considered dangerous?
Correct Answer: A
Explanation
Web browser cookies are small pieces of data that are stored by a website on a user's browser. They are used to remember information about the user, such as preferences, login details, shopping cart items, etc. Cookies can also be used to identify and track users across different websites, which can have implications for privacy and security. For example, cookies can be used to show targeted ads based on the user's browsing history, or to collect personal information without the user's consent. Cookies are not inherently dangerous, but they can pose some risks if they are misused or compromised by malicious actors. References:
* Linux Essentials - Linux Professional Institute (LPI), section 1.4.2
* 1.4 Lesson 1 - Linux Professional Institute Certification Programs, slide 18
Web browser cookies are small pieces of data that are stored by a website on a user's browser. They are used to remember information about the user, such as preferences, login details, shopping cart items, etc. Cookies can also be used to identify and track users across different websites, which can have implications for privacy and security. For example, cookies can be used to show targeted ads based on the user's browsing history, or to collect personal information without the user's consent. Cookies are not inherently dangerous, but they can pose some risks if they are misused or compromised by malicious actors. References:
* Linux Essentials - Linux Professional Institute (LPI), section 1.4.2
* 1.4 Lesson 1 - Linux Professional Institute Certification Programs, slide 18
- Other Version
- 1501Lpi.010-160.v2025-11-17.q85
- 1513Lpi.010-160.v2024-05-31.q64
- 80Lpi.Actualtestpdf.010-160.v2021-11-15.by.donald.33q.pdf
- Latest Upload
- 112Juniper.JN0-281.v2026-11-11.q85
- 108Lpi.010-160.v2026-11-11.q101
- 111PECB.ISO-IEC-27002-Foundation.v2026-11-11.q39
- 103Huawei.H12-323_V2.0.v2026-11-11.q259
- 126Microsoft.AB-900.v2026-11-10.q89
- 139Juniper.JN0-351.v2026-11-09.q113
- 161NVIDIA.NCP-OUSD.v2026-11-09.q68
- 148InsuranceLicensing.NY-Independent-General-Adjuster.v2026-11-07.q35
- 161Salesforce.Analytics-Con-202.v2026-11-06.q31
- 269PureStorage.FlashArray-Implementation-Specialist.v2026-11-06.q111
[×]
Download PDF File
Enter your email address to download Lpi.010-160.v2026-11-11.q101 Practice Test
