Unit content
Files and filesystems
Persistent storage contains blocks of bytes, but users and programs normally work with a higher-level abstraction: files organized by a filesystem.
Files
A file is a named persistent sequence of data together with metadata such as size, timestamps and access permissions.
The bytes in a file acquire meaning from their format: the same filesystem can store source code, images, databases or arbitrary binary data.
Directories and paths
Directories organize names into a hierarchy. A path identifies a location by following directory names:
/home/ada/project/report.txt
An absolute path begins from the filesystem root, while a relative path is interpreted from a current directory.
Metadata and permissions
Filesystems track information beyond file contents. Permissions can restrict which users or processes may read, modify or execute particular files.
Names versus underlying objects
A filename is a directory entry referring to filesystem data; the human-readable name is not necessarily the storage object itself. Some filesystems allow several names to refer to the same underlying file.
Filesystem responsibility
The filesystem maps the logical hierarchy of files and directories onto persistent storage while maintaining allocation and metadata.
This abstraction lets programs work with named persistent objects instead of physical disk sectors.