05.Linux File System

Source: Internet
Author: User

Basic framework:

A) What is a file system

b) File type

c) Mount and Umount

d) Soft connection and hard connection

1. What is a file system

File system: Ways to organize files on disk, such as NTFS under Windows, FAT

System V, Ext2, ext3 under LINUX

Buy back the hard disk to be partitioned and formatted to use, hard disk partition information saved on the hard disk 0 Track 0 sector, the other hard disk usage status information and management information is also saved on the hard disk.

Each partition in a Linux system is a file system.

The path below a partition in a Linux system does not necessarily belong to that partition, because the path below a partition can mount other partitions (file systems).

Directory structure of the ♦linux system:

/etc: Configuration file

/sbin: System Management Program

/dev: Device files

/bin: Common Commands

/boot: The file used to start

/lib: Shared Dynamic Connection Library

/root: Household Directory

Home Directory for individual users

/usr: Store application,/usr/lib (library)/usr/include (header file)

2. file type: the

1) Common Files: (-) divided into text files and binary files

2) Catalog file: (d)

3) device files: generally stored in the/dev directory

/dev/tty1 (c) Character device file

/DEV/SDA1 (b) block device files

4) Soft Connection file: Start with L, followed by "-" point to the connected file

3. Mount with the Umount

If you want to use a file system, first mount the file system

1) Mount + device name + path:

Device names can be viewed through fdisk–l

Mount Path usually to/mnt/

2) Umount + device name/mount point path: Uninstall

3) partition status of Linux operating system:

• Boot partition

• Root partition

• System swap partition temporary file system (TMPFS), used for memory, equivalent to virtual memory

Features: When the system shuts down, the files that exist in the zone will disappear, but their access speed is relatively fast

Fdisk–l viewing the current partition status

Df-h viewing the mount points for each partition

4. Soft Connection with the Hard Connect

Each file on the hard disk must have an index node to record the file management information, a partition has many files (stored in the file data area), there are many index nodes (stored in the index node area), each index node has an index node number ( also called do the I node number ), these index node numbers are stored in an array ( index node Number group ).

With the file name, you can find the index node number, find the index node, and finally find the appropriate file.

1 Hard Connect : The directory itself is a file, the directory file contains many of the file name and index node number, each pair of file names and index nodes is called a hard connection

Ln: Create a connection

Ls–i (inode) View the index node number of a file/directory

2) Soft connection (also known as symbolic Connection)

Soft connections can be built across partitions, but hard connections do not.

Ln–s to create a soft connection

The way to open a soft connection file with LS is to open it indirectly, and the hard connection is to open the file corresponding to the I node number directly.

3) The difference between a soft connection and a hard connection:

Features of indirect open mode: efficiency is lower than direct open, but it can be established across partitions .

05.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.