FOC - E01

LINUX FILE SYSTEM

One essential part of the operating system is the Linux file system.

It offers a hierarchical data management and organization system.

Root Directory: The root directory ("/") is the top-level directory in the Linux file system. Files and subdirectories are found in directories.

Data management: Linux file system maintains metadata, sizes, creation dates, and file names. It is responsible for ownership, security, and permissions.

 

Representation and Organization of Storage Resources: Disk space is allocated for files and directories. It also maintain Directory structure and store Metadata for each file.

Pathnames: A pathname is a text string made up of one or more names separated by forward slashes(/) e.g: ./etc/ passwd,/var/log/auth.log, assignment 02 /check, etc.

examples of pathnames:

      /home

      /etc/passwd

      usr / wc

      /var/ ntpstats loopstats

Change directory using a relative path:

  •  $pwd
  • /home/kt
  • $cd abc                  
  • $pwd
  • /home/kt/abc   

 

Change the directory using an absolute path:

  • $pwd
  • /home/kt
  • $cd /home/kt/abc
  • $pwd
  • /home/kt/abc   

 

 

7. File Types in Linux:

  1. Regular files
  2. Directories
  3. Character device files
  4. Block device files
  5. Local domain sockets
  6. Named pipes (FIFO)


In Linux, everything is treated as a file or a process.

Common file types include regular files, directories, character device files, block device files, local domain sockets, named pipes (FIFO), and link files.

These file types remain consistent even with new additions to the system.

 

1.  Regular (Ordinary) Files:

Used to store various types of data.

Can have file extensions but not mandatory.

 

2. Directories:

Used to organize and locate files and directories.

Start with a root directory and form parent-child relationships.

3. Special Files (Character and Block Devices):

 

Represent hardware devices as files.

Create a universal interface for hardware and virtual devices.

Allow direct interaction with hardware.

 

 

4. Link Files (Hard Links and Soft Links):

 

Enable referencing files by different names or locations.

Hard links create mirror copies of original files.

Symbolic links act as pointers to file locations.

 

5. Socket Files:

Used for communication between applications, especially in networking.

Identified by an IP address and port number.

Facilitate data exchange between applications.

 

6. Named Pipes (FIFO Files):

Used for inter-process communication on the same host.

Created and removed with commands.

Serve a similar purpose to local domain sockets.

This overview provides a good understanding of the Linux file system, its structure, and the different types of files and their roles within the system.


Comments

Popular posts from this blog

FOC - DO3

FOC - A03