Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
64 views

File System in Linux

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

File System in Linux

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

What is the filesystem?

In a computer, a file system -- sometimes written filesystem -- is the way in which files
are named and where they are placed logically for storage and retrieval. Without a
file system, stored information wouldn't be isolated into individual files and would be
difficult to identify and retrieve. As data capacities increase, the organization and
accessibility of individual files are becoming even more important in data
storage.

Digital file systems and files are named for and modeled after paper-based
filing systems using the same logic-based method of storing and retrieving
documents. File systems can differ between operating systems (OS),
such as
 Microsoft Windows,
 macOS and
 Linux-based systems
Some file systems are designed for specific applications. Major types of file
systems include
 Distributed file systems,
 Disk-based file systems and
 Special purpose file systems.

What is the use of file system?


The file system enables you to view a file in the current directory as files are
often managed in a hierarchy. A disk (e.g., Hard disk drive) has a file system,
despite type and usage.

How file systems work


A file system stores and organizes data and can be thought of as a type of
index for all the data contained in a storage device. These devices can include

 Hard drives,
 Optical drives and
 Flash drives.

File systems specify conventions for naming files, including the maximum
number of characters in a name, which characters can be used and, in some
systems, how long the file name suffix can be. In many file systems, file
names are not case sensitive.

Along with the file itself, file systems contain information such as the size of
the file, as well as its attributes, location and hierarchy in the directory in the
metadata. Metadata can also identify free blocks of available storage on the
drive and how much space is available.

File systems and the role of metadata


File systems use metadata to store and retrieve files. Examples of metadata
tags include:
 Date created

 Date modified

 Last date of access

 Last backup

 User ID of the file creator

 Access permissions

 File size

File system access


File systems can also restrict read and write access to a particular group of
users. Passwords are the easiest way to do this. Along with controlling who
can modify or read files, restricting access can ensure that data modification is
controlled and limited.

File permissions such as access or capability control lists can also be used to
moderate file system access. These types of mechanisms are useful to
prevent access by regular users, but not as effective against outside intruders.

Types of file systems


There are a number of types of file systems, all with different logical structures
and properties, such as speed and size. The type of file system can differ by
OS and the needs of that OS. The three most common

PC operating systems are


 Microsoft Windows,
 Mac OS X and
 Linux.
Mobile OSes include
 Apple iOS and
 Google Android.

Major file systems include the following:

File allocation table (FAT) is supported by the Microsoft Windows OS. FAT
is considered simple and reliable, and it is modeled after legacy file systems.
FAT was designed in 1977 for floppy disks, but was later adapted for hard
disks. While efficient and compatible with most current OSes, FAT cannot
match the performance and scalability of more modern file systems.

Global file system (GFS) is a file system for the Linux OS, and it is a shared
disk file system. GFS offers direct access to shared block storage and can be
used as a local file system.

Hierarchical file system (HFS) was developed for use with Mac operating
systems. HFS can also be referred to as Mac OS Standard, and it was
succeeded by Mac OS Extended. Originally introduced in 1985 for floppy and
hard disks, HFS replaced the original Macintosh file system. It can also be
used on CD-ROMs.

New Technology File System (NTFS) -- is the default file system for
Windows products from Windows NT 3.1 OS onward. Improvements from the
previous FAT file system include better metadata support, performance and
use of disk space. NTFS is also supported in the Linux OS through a free,
open-source NTFS driver. Mac OSes have read-only support for NTFS.

Universal Disk Format (UDF) is a vendor-neutral file system used on optical


media and DVDs. UDF replaces the ISO 9660 file system and is the official
file system for DVD video and audio as chosen by the DVD Forum.

Filesytem in Linux
Filesystems also require an Application Programming Interface (API) that
provides access to system function calls which manipulate filesystem objects
like files and directories. APIs provide for tasks such as creating, moving, and
deleting files. It also provides algorithms that determine things like where a file
is placed on a filesystem. Such algorithms may account for objectives such as
speed or minimizing disk fragmentation.

Modern filesystems also provide a security model, which is a scheme for


defining access rights to files and directories. The Linux filesystem security
model helps to ensure that users only have access to their own files and not
those of others or the operating system itself.

1. The entire Linux directory structure starting at the top (/) root directory.
2. A specific type of data storage format, such as EXT3, EXT4, BTRFS, XFS,
and so on. Linux supports almost 100 types of filesystems, including some
very old ones as well as some of the newest. Each of these filesystem types
uses its own metadata structures to define how the data is stored and
accessed.
3. A partition or logical volume formatted with a specific type of filesystem that
can be mounted on a specified mount point on a Linux filesystem.
Directory structure

Directory Description

/ (root The root filesystem is the top-level directory of the filesystem. It must
filesystem) contain all of the files required to boot the Linux system before other
filesystems are mounted. It must include all of the required executables
and libraries required to boot the remaining filesystems. After the system
is booted, all other filesystems are mounted on standard, well-defined
mount points as subdirectories of the root filesystem.

/bin The /bin directory contains user executable files.

/boot Contains the static bootloader and kernel executable and configuration
files required to boot a Linux computer.

/dev This directory contains the device files for every hardware device
attached to the system. These are not device drivers, rather they are
files that represent each device on the computer and facilitate access to
those devices.

/etc Contains the local system configuration files for the host computer.

/home Home directory storage for user files. Each user has a subdirectory in
/home.

/lib Contains shared library files that are required to boot the system.

/media A place to mount external removable media devices such as USB thumb
Directory Description

drives that may be connected to the host.

/mnt A temporary mountpoint for regular filesystems (as in not removable


media) that can be used while the administrator is repairing or working
on a filesystem.

/opt Optional files such as vendor supplied application programs should be


located here.

/root This is not the root (/) filesystem. It is the home directory for the root
user.

/sbin System binary files. These are executables used for system
administration.

/tmp Temporary directory. Used by the operating system and many programs
to store temporary files. Users may also store files here temporarily.
Note that files stored here may be deleted at any time without prior
notice.

/usr These are shareable, read-only files, including executable binaries and
libraries, man files, and other types of documentation.

/var Variable data files are stored here. This can include things like log files,
MySQL, and other database files, web server data files, email inboxes,
and much more.

You might also like