Disks, files, and directories
In a computer, a file is nothing more than a group of data referenced using a unique name. For example, all the employee details can be grouped and stored in a file with a name such as employees
, and whenever we need to see employee data, we will open the employees
file and search for that data. This is taken from the analogy that if we want to persist all the employee details in a non-digital form, we will write them on paper, pin all the papers together, and keep them in a file.
Disks are nothing more than a storage medium where a file can be stored. Taking the previous analogy, disks can be compared to racks where a file can be stored. One key thing that a disk should support is a way to manage files, organize them, define properties of files, such as when it was created/modified, the capability to find available space on disk, and so on. This is where filesystems come into play, which usually come along with the operating system and have in them...