Files
Files are the basic unit of data storage from the user's perspective.
On a low level, a file is just a linear sequence of bytes that can be read and written. The OS doesn't know what kind of data a file contains - it could be an image, text, code, etc.
Each file has associated metadata managed by the OS:
- File name - A unique identifier for the file
- File type - Indicates the type of data (image, text, etc)
- File size - The number of bytes the file contains
- Permissions - Controls who can access the file
- Timestamps - Creation, modified, and access times
Additionally, each file has an inode number that identifies it within the file system. This inode number maps the file to its data blocks on disk. We'll talk more about inodes later.