Files and Directories
In this lesson, we briefly introduce files and directories.
Two key abstractions have developed over time in the virtualization of storage.
File
The first is the file. A file is simply a linear array of bytes, each of which you can read or write. Each file has some kind of low-level name, usually a number of some kind. Often, the user is not aware of this name (as we will see). For historical reasons, the low-level name of a file is often referred to as its inode number. We’ll be learning a lot more about inodes in future chapters. For now, just assume that each file has an inode number associated with it.
In most systems, the OS does not know much about the structure of the file, e.g., whether it is a picture, or a text file, or C code. Rather, the responsibility of the file system is simply to store such data persistently on disk and make sure that when you request the data again, you get what you put there in the first place. Doing so is not as simple as it seems!
Directory
The second ...