Which directory contains files that are variable, meaning they change constantly, such as database files and log files?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which directory contains files that are variable, meaning they change constantly, such as database files and log files?

Explanation:
Variable data refers to files that grow or change as the system runs—logs, databases, caches, and similar ongoing state. The directory designed for this kind of data is /var. It contains subdirectories like /var/log for logs, /var/lib for application state such as databases, and /var/cache for cached data. These files reflect activity and persistence over time, which is why database and log files belong here. In contrast, /tmp is meant for ephemeral temporary files, /usr holds mostly static program files, and /etc stores configuration data that isn’t the ongoing dynamic data the system generates.

Variable data refers to files that grow or change as the system runs—logs, databases, caches, and similar ongoing state. The directory designed for this kind of data is /var. It contains subdirectories like /var/log for logs, /var/lib for application state such as databases, and /var/cache for cached data. These files reflect activity and persistence over time, which is why database and log files belong here. In contrast, /tmp is meant for ephemeral temporary files, /usr holds mostly static program files, and /etc stores configuration data that isn’t the ongoing dynamic data the system generates.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy