About this exam
XK0-004 is the CompTIA exam CompTIA Linux+ (Plus).
Paid practice material for this exam is not available yet, but you can try its free sample questions.
- Exam code
- XK0-004
- Vendor
- CompTIA
- Practice questions
- Not available yet
- Free sample questions
- 5
- Question bank last updated
- Not available yet
Try 2 sample questions
Taken from the free sample set for XK0-004.
Question 1
Which of the following is the BEST reason for not storing database files in the /var directory?
- AOption A:
The /var filesystem is not fast enough for database files.
- BOption B:
The number of files in /var is limited by the available inodes.
- COption C:
Files in /var do not have strict file permissions.
- DOption D:
If log files fill up /var, it might corrupt the database.
Show answer and explanation
Correct answer: D
The best answer is D. If log files fill up /var, it might corrupt the database. The /var directory is used for variable data such as log files, cache files, and application data, which can grow unexpectedly over time. If log files consume all available space in the /var filesystem, a database stored there may be unable to write new data or complete transactions properly. This can lead to database errors, service interruptions, or even data corruption. Therefore, databases are often placed on a separate filesystem or partition to protect them from space-related issues caused by other applications.
Question 2
Atechnical support engineer receives a ticket from a user who is trying to create a 1KB file in the
/tmp directory and is getting the following error No space left on device. The support engineer
checks the /tmp directory, and it has 20GB of free space.
Which of the following BEST describes a possible cause for this error?
- AOption A:
The /tmp directory is not mounted.
- BOption B:
B. The filesystem is formatted with a 4MB block size.
- COption C:
the files ystem ran out of inodes.
- DOption D:
The /tmp directory has been set with an immutable attribute.
Show answer and explanation
Correct answer: C
Even though the /tmp directory has 20GB of free disk space, creating a new file also requires a free inode, which stores metadata about files. If all available inodes have been used, the system cannot create any additional files and will return the error "No space left on device" despite having plenty of free storage space. This situation commonly occurs when a filesystem contains a very large number of small files. Therefore, the most likely cause of the error is that the filesystem has exhausted its available inodes, making Option C the best answer.
See all 5 free sample questions