LPI 101-500 Exam Practice Questions (P. 2)
- Full Access (120 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #6
FILL BLANK -
Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters).
Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters).
Correct Answer:
updatedb
updatedb

Professor's Comment:
The 'updatedb' command is crucial for the 'locate' command to function efficiently as it refreshes the database that 'locate' searches to find files. This ensures that the file listings are current and accurate, making searches with 'locate' faster and more reliable. So, whenever you're using 'locate' to find files on the system, it's searching through data prepared by a recent run of 'updatedb'.
send
light_mode
delete
Question #7
What does the command mount --bind do?
- AIt makes the contents of one directory available in another directoryMost Voted
- BIt mounts all available filesystems to the current directory
- CIt mounts all user mountable filesystems to the user's home directory
- DIt mounts all file systems listed in /etc/fstab which have the option userbind set
- EIt permanently mounts a regular file to a directory
Correct Answer:
A
A

The `mount --bind` command allows for mounting one directory to another, making the contents of the first directory accessible in the second. This can be useful for creating mirrors of directories or integrating separate storage solutions without moving the data physically. This practice is frequently used in managing file system structures without duplicating data. For example, if you need to work on files from a protected or distant directory within a local environment, using bind mounts makes this straightforward and efficient.
send
light_mode
delete
Question #8
Consider the following output from the command ls `"i:

How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?

How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?
- Aln -h a.txt c.txt
- Bln c.txt a.txt
- Cln a.txt c.txtMost Voted
- Dln -f c.txt a.txt
- Eln -i 525385 c.txt
Correct Answer:
C
C
send
light_mode
delete
Question #9
Consider the following directory:
drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales
Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)
drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales
Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)
- Achmod g+s salesMost Voted
- Bsetpol -R newgroup=sales sales
- Cchgrp -p sales salesMost Voted
- Dchown --persistent *.sales sales
- Echmod 2775 sales
Correct Answer:
AE
AE

The correct approach to ensure that new files created within the 'sales' directory inherit the 'sales' group ownership involves setting the group-set-ID (SGID) bit on the directory. Using `chmod g+s sales` or `chmod 2775 sales` effectively sets this SGID bit. Specifically, `chmod g+s sales` applies the SGID directly, whereas `chmod 2775 sales` assigns comprehensive permissions (read, write, execute for owner and group; read and execute for others) along with the SGID, indicated by the leading '2' in '2775'. This setting ensures that the group ownership is maintained consistently for all new files created within the directory.
send
light_mode
delete
Question #10
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose two.)
- Acat /proc/self/mounts
- Bfree
- Clsmounts
- Dmount
- Ecat /proc/filesystems
Correct Answer:
AD
AD

The correct answers, A) cat /proc/self/mounts and D) mount, reflect two different methods of displaying all currently mounted filesystems in Linux. Option A can be utilized by executing `cat /proc/self/mounts`, which reads a system-specific file displaying current mount points in a list format. Option D utilizes the `mount` command without additional arguments, serving as a straightforward method to display a list of all mounted filesystems. This approach is specially reliable for real-time system management and checks. Both methods are highly informative and effective for system diagnostics.
send
light_mode
delete
All Pages