[Feb 20, 2024] 101-500 Exam Dumps, 101-500 Practice Test Questions
Free 101-500 Study Guides Exam Questions and Answer
NEW QUESTION # 47
Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)
Answer:
Explanation:
/tmp, tmp,/var/tmp, /tmp/, /var/tmp/
NEW QUESTION # 48
Which of the following statements is correct for a command line ending with a & character?
- A. The result of the command defines if the next command will be run.
- B. The command is run as a direct child of theinitprocess.
- C. The command's output is redirected to/dev/null.
- D. Thecommand is run in background of the current shell.
Answer: D
Explanation:
Explanation
The statement that is correct for a command line ending with a & character is that the command is run in background of the current shell. The & character tells the shell to run the command in the background, which means that the shell does not wait for the command to finish and returns the prompt immediately. The command's output is not redirected to /dev/null, unless explicitly specified. The result of the command does not define if the next command will be run, unless the commands are separated by a logical operatorsuch as && or ||. The command is not run as a direct child of the init process, unless the shell is the init process itself. References: [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.1: Work on the command line, Background Processes
NEW QUESTION # 49
Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?
- A. which foo
- B. locate foo
- C. apropos foo
- D. whatis foo
- E. lsattr foo
Answer: E
NEW QUESTION # 50
Which of the following commands changes all occurrences of the word "bob" in file data to "Bob" and prints the result to standard output?
- A. sed's/bob/Bob/g' data
- B. sed'/bob/Bob/' data
- C. sed's/bob,Bob/' data
- D. sed's/bob/Bob/' data
- E. sed'/bob/Bob' data
Answer: A
NEW QUESTION # 51
In compliance with the FHS, in which of the following directories are documentation files found?
- A. /usr/local/share/documentation
- B. /usr/share/documentation
- C. /var/share/doc
- D. /etc/share/doc
- E. /usr/share/doc
Answer: E
Explanation:
Explanation
According to the FHS (Filesystem Hierarchy Standard), the /usr/share/doc directory is used to store documentation files for various packages installed on the system. The documentation files may include README files, manuals, license agreements, changelogs, etc. The /usr/share/doc directory is intended to be read-only and independent of the machine architecture. The other directories are not compliant with the FHS or do not exist by default. The /usr/share/documentation directory is not a standard directory and may not be recognized by some applications. The /usr/local/share/documentation directory is also not a standard directory and may conflict with the /usr/local/share/doc directory, which is used for documentation files for locally installed packages. The /var/share/doc directory does not exist by default and is not a valid subdirectory of
/var, which is used for variable data files. The /etc/share/doc directory does not exist by default and is not a valid subdirectory of /etc, which is used for configuration files. References:
* LPI 101-500 Exam Objectives, Topic 101.3, Weight 2
* LPI Learning Materials, Chapter 1.3, Finding Linux Documentation
* Web Search Results, 1
NEW QUESTION # 52
Creating a hard link to an ordinary file returns an error. What could be the reason for this?
- A. The source file is a shell script.
- B. The source file is already a hard link.
- C. The source file is hidden.
- D. The source file is read-only.
- E. The source and the target are on different filesystems.
Answer: E
NEW QUESTION # 53
From a Bash shell, which of the following commands directly executes the instruction from the file
/usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)
- A. /bin/bash /usr/local/bin/runme.sh
- B. source /usr/local/bin/runme.sh
- C. . /usr/local/bin/runme.sh
- D. run /usr/local/bin/runme.sh
- E. /usr/local/bin/runme.sh
Answer: B,C
NEW QUESTION # 54
Which of the following commands can be used to determine how long the system has been running? (Choose two.) uptime
- A. uname -u
- B. time --up
- C.
- D. top
- E. up
Answer: C,E
NEW QUESTION # 55
Which grep command will print only the lines that do not end with a / in the file foo?
- A. grep'/$' foo
- B. grep -v '/$' foo
- C. grep -v '/#' foo
- D. grep '/#' foo
Answer: B
NEW QUESTION # 56
Which of the following is a limitation of the cut command?
- A. Thecutcommand cannot reorder fields.
- B. Thecutcommand can only select output by field position.
- C. Thecutcommand cannot use different input and output delimiters.
- D. Thecutcommand only works on ASCII text.
Answer: A
Explanation:
Explanation
The cut command is used to extract selected portions of each line of a file or a stream. The -f option is used to specify the fields to be extracted, separated by commas. The -d option is used to specify the delimiter that separates the fields. The default delimiter is the tab character. The cut command can only select output by field position, not by field content. The cut command can also work on non-ASCII text, such as UTF-8 encoded text. The cut command can use different input and output delimiters, but only if the output delimiter is specified by the --output-delimiter option. The cut command cannot reorder fields, meaning that the output fields will always appear in the same order as the input fields. To reorder fields, other commands such as awk or sed can be used. References:
* LPI 101-500 Exam Objectives, Topic 103.7, Weight 4
* LPI Learning Materials, Chapter 3.7, Basic Scripting
* Web Search Results,
NEW QUESTION # 57
Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)
- A. /var/tmp/
- B. A
- C. /tmp
- D. tmp,
- E. /var/tmp/
Answer: B
Explanation:
Explanation
The world-writable directory that should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem is /tmp. This directory is used by applications and users to store temporary files, and it is world-writable by default. By creating a separate partition for /tmp, the amount ofspace available to users is limited, and the root filesystem is protected from being filled up by temporary files1.
To create a separate partition for /tmp, you can use the fdisk or parted command to create a new partition on the disk. Once the partition is created, you can format it with a filesystem such as ext4, and then mount it to the /tmp directory using the mount command. Finally, you can modify the /etc/fstab file to ensure that the partition is mounted automatically at boot time1. Here is an example of the steps to create a separate partition for /tmp:
After completing these steps, the /tmp directory will be mounted on a separate partition, and users will be limited in the amount of space they can use for temporary files.
References:
* LFCS: Linux World-Writable Directory Partitioning
NEW QUESTION # 58
Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)
- A. ext3
- B. ext2
- C. JFS
- D. XFS
- E. procfs
Answer: A,B
NEW QUESTION # 59
Which of the following vi commands deletes two lines, the current and the following line?
- A. dd2
- B. d2
- C. 2dd
- D. de12
- E. 2d
Answer: C
NEW QUESTION # 60
Which of the following commands show how the shell handles a specific command?
- A. fileinfo
- B. case
- C. stat
- D. where
- E. type
Answer: E
NEW QUESTION # 61
Which of the following commands will load a kernel module along with any required dependency modules?
- A. loadmod
- B. depmod
- C. modprobe
- D. module_install
- E. insmod
Answer: C
NEW QUESTION # 62
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?
- A. sed '/bob/Bob' letter > newletter
- B. sed s/bob/Bob/ letter < newletter
- C. sed 's/bob, Bob/' letter > newletter
- D. sed's/bob/Bob' letter > newletter
- E. sed 's/bob/Bob/g' letter > newletter
Answer: E
NEW QUESTION # 63
Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.)
- A. 0
- B. 1
- C. 2
- D. 3
- E. 4
Answer: A,D
Explanation:
Explanation
Run levels are predefined modes of operation in the SysV init system that determine which processes and services are started or stopped. The default run level is the one that the system enters after booting. It is usually specified in the /etc/inittab file with a line like id:5:initdefault:. The run levels 0 and 6 should never be declared as the default run level because they are used to halt and reboot the system, respectively. If they are set as the default, the system will enter an endless loop of shutting down and restarting. The other run levels (1-5) have different meanings depending on the distribution, but they usually correspond to single-user mode, multi-user mode, network mode, graphical mode, etc. References: LPI Linux Essentials - 1.101.2, LPI Linux Administrator - 101.3
NEW QUESTION # 64
......
101-500 Exam Dumps, 101-500 Practice Test Questions: https://www.braindumpsit.com/101-500_real-exam.html
Attested 101-500 Dumps PDF Resource [2024]: https://drive.google.com/open?id=1SrJJ4rWnyn6MIevrJ7ZJLEv7oP1EuuXU