Linux file system

Source: Internet
Author: User

Take a look at some of this information and learn some of the basics of Linux file systems. Mainly include: Linux disk partition and directory, the basic principle of mount, file storage structure, soft connection hard link and so on.

1. Linux Disk partitions and directories

There is little difference between Linux distributions, and the directory structure is basically the same. The Windows file system structure is tied to multiple tree structures, and the top of the tree is a different disk partition. and the Linux file system structure is a single tree-like structure. Under Ubuntu, you can view the tree structure by command.

The relationship between Linux disk partitions and directories is as follows:

-Any partition must be mounted on a directory for read and write operations

-The directory is a logical distinction. Partitioning is a physical distinction

-The root directory is where all Linux files and directories are located and requires a disk partition to mount

Some common commands:

-fdisk view hard disk partition table

-DF Viewing partition usage

-du Viewing file Usage

Ps: Why partition? Separate data management to reduce risk; Large disk search efficiency is low; defragmentation.

2, the concept of Mount

Mount: When using a device, these devices must be mapped to a directory, which becomes a "mount point" for read and write operations. Mounting blocks the details of the physical partition, and the user has only a unified logic concept.

In a Linux system, using/etc/fstab to mount partitions, the Linux kernel automatically mounts the file system with reference to this file.

3. File type

-Normal file

-Catalog File

-Link File

-Special Documents

4. File storage structure

A file includes:

-Directory entry: File name +inode node number

-INode: File index node, store file basic information, storage location, data block pointer storage location

Specifically including Inumber+file Type+owner id+link count+ ... Does not contain a file name

-Data block: File specific content

When viewing a file, the file attributes and location are found in the Inode table before the data is read.

  

Linux file system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.