Linux File System
Linux File System
A
partition is a segment of memory and contains some specific data. In our machine,
there can be various partitions of the memory. Generally, every partition contains a
file system.
o Primarily the computer saves data to the RAM storage; it may lose the data if
it gets turned off. However, there is non-volatile RAM (Flash RAM and SSD)
that is available to maintain the data after the power interruption.
o Data storage is preferred on hard drives as compared to standard RAM as
RAM costs more than disk space. The hard disks costs are dropping gradually
comparatively the RAM.
If we have an unsupported file format in our file system, we can download software
to deal with it.
A file system is designed in a way so that it can manage and provide space for non-
volatile storage data. All file systems required a namespace that is a naming and
organizational methodology. The namespace defines the naming process, length of
the file name, or a subset of characters that can be used for the file name. It also
defines the logical structure of files on a memory segment, such as the use of
directories for organizing the specific files. Once a namespace is described, a
Metadata description must be defined for that particular file.
The data structure needs to support a hierarchical directory structure; this structure is
used to describe the available and used disk space for a particular block. It also has
the other details about the files such as file size, date & time of creation, update, and
last modified.
Also, it stores advanced information about the section of the disk, such as partitions
and volumes.
The advanced data and the structures that it represents contain the information
about the file system stored on the drive; it is distinct and independent of the file
system metadata.
Linux file system contains two-part file system software implementation architecture.
Consider the below image:
The file system requires an API (Application programming interface) to access the
function calls to interact with file system components like files and
directories. API facilitates tasks such as creating, deleting, and copying the files. It
facilitates an algorithm that defines the arrangement of files on a file system.
The first two parts of the given file system together called a Linux virtual file
system. It provides a single set of commands for the kernel and developers to access
the file system. This virtual file system requires the specific system driver to give an
interface to the file system.
o Specifying paths: Linux does not use the backslash (\) to separate the
components; it uses forward slash (/) as an alternative. For example, as in
Windows, the data may be stored in C:\ My Documents\ Work, whereas, in
Linux, it would be stored in /home/ My Document/ Work.
o Partition, Directories, and Drives: Linux does not use drive letters to
organize the drive as Windows does. In Linux, we cannot tell whether we are
addressing a partition, a network device, or an "ordinary" directory and a
Drive.
o Case Sensitivity: Linux file system is case sensitive. It distinguishes between
lowercase and uppercase file names. Such as, there is a difference between
test.txt and Test.txt in Linux. This rule is also applied for directories and Linux
commands.
o File Extensions: In Linux, a file may have the extension '.txt,' but it is not
necessary that a file should have a file extension. While working with Shell, it
creates some problems for the beginners to differentiate between files and
directories. If we use the graphical file manager, it symbolizes the files and
folders.
o Hidden files: Linux distinguishes between standard files and hidden files,
mostly the configuration files are hidden in Linux OS. Usually, we don't need
to access or read the hidden files. The hidden files in Linux are represented by
a dot (.) before the file name (e.g., .ignore). To access the files, we need to
change the view in the file manager or need to use a specific command in the
shell.
Ext2 is the first Linux file system that allows managing two terabytes of data. Ext3 is
developed through Ext2; it is an upgraded version of Ext2 and contains backward
compatibility. The major drawback of Ext3 is that it does not support servers because
this file system does not support file recovery and disk snapshot.
Ext4 file system is the faster file system among all the Ext file systems. It is a very
compatible option for the SSD (solid-state drive) disks, and it is the default file
system in Linux distribution.