Skip to main content

Posts

Showing posts from May, 2023

All is File - Quest

The Quest for the Mystical Files   Welcome to the world of Linux, where everything is treated as a file. In this adventure, you will explore the mysterious realm of temporary files and the fascinating world of links. Embark on a quest filled with challenges and discoveries as you learn how to manage these unique aspects of the Linux operating system. Prepare yourself for a thrilling adventure that will culminate in an epic battle against a formidable boss. Chapter 1: The Temple of Temporary Files Your journey begins at the entrance of the Temple of Temporary Files. This sacred place holds the secrets of files that exist only for a short time. These files serve various purposes, from storing data for running processes to crash logs and cache files. As you venture deeper into the temple, you will discover the different locations designated for temporary files. Chapter 2: The Treasures of /tmp and /var/tmp Your quest leads you to the first location, /tmp, as defined by the Filesystem ...

All is File - Test 2

5.4 Special Files and Directories Understanding /tmp and link Practice Exam Questions 2 1. Carol has created a hard link named "link1" to a file named "file1.txt" in her current directory. She then modifies the contents of "link1" using a text editor. What will be the result of this action?   a) Only "link1" will be modified. b) Only "file1.txt" will be modified. c) Both "link1" and "file1.txt" will be modified. d) Modifying a hard link is not allowed. /* --------------------- */ -------------------------- Answer 1 Below:  -------------------------- /* --------------------- */ Explanation : When a hard link is created, it points to the same data on disk as the original file. Modifying either the hard link or the original file will affect both, as they are essentially two different names for the same data. Any changes made to one will be reflected in the other. Explanation of incorrect answers : a) ...

All is File - Test 1

5.4 Special Files and Directories Understanding /tmp and link Practice Exam Questions 1 Scenario : 1. A developer needs to store temporary files that should persist between reboots. Which directory should the developer choose? a) /tmp b) /var/tmp c) /run d) /var/run /* --------------------- */ -------------------------- Answer 1 Below:  -------------------------- /* --------------------- */ Explanation : According to the Filesystem Hierarchy Standard (FHS), the /var/tmp directory is intended for storing temporary files that should not be cleared during system boot-up. Files stored in this directory are expected to persist between reboots, making it suitable for temporary data that needs to be retained across system restarts. Explanation of incorrect answers : a) /tmp: The /tmp directory is recommended for temporary files that do not need to persist between invocations of a program. It is cleared during system boot-up, so files stored here will not survive a r...