The operating system (OS) is system software that manages the basic functionalities of a computer and is responsible for tasks such as process management, memory management, file system management, IO management, networking, security, and providing a user interface.
The filesystem is the data structure used by the operating system to store and retrieve data.
A file is a unit of storage used to describe a self-contained piece of data and can have a variety of possible formats based on what that file contains.
A directory is a data structure that contains references to files and other directories. They are typically organized in a hierarchical tree structure called a directory tree.
A working directory, also called a current directory, is the directory associated with the execution of a process.
File attributes are a collection of metadata that determine how files behave, such as if they are hidden or compressed.
File permissions determine which users and groups can read, write, and execute the file.
A file control block contains the metadata for a file, such as permissions and access times.
The filesystem has multiple layers of abstraction: The applications, logical file system, File-organization module, basic file system, IO control, and devices.
Both files and directories can be created, opened, read, written, deleted, closed, linked, unlinked, listed and truncated. It is possible to move across directories as well as find files within directories.
// Create a file named lunchtouch lunch// Write a list of foods to the lunch fileecho "burger, salad, and sandwich" > lunch// Read the filecat lunch// Delete the filerm lunch// Make a directory named dinnermkdir dinner// List the files in the dinner directoryls dinner// Delete the directoryrm -r dinner