Little white Python Road 10/31&11/1 file operating system

Source: Internet
Author: User
Tags disk usage

Introduction to the file operating system

EXT4 Superblock block is super fast, Innode block is dedicated to storing file information,

Block count makes the hard disk block blocks, the operating system is written on block blocks can be, eg: file 10g, divided into n block blocks, then corresponding sectors, sectors corresponding to the magnetic

the Innode one layer LS-l/etc/passwd#View File PermissionsLl-i/etc/passwd#View the Innode number of the file, equivalent to our ID cardDF-I view Innode Supplementary disk is divided into two cases, one is the space full of the number of files reached the upper limit a file corresponding to a innode number, Innode can not build a file without it MKFS.EXT4/dev/Sdb4mount/DEV/SDB4/SDB4DF-I Touch/sdb4/(1..5). txt building multiple files ls/Sdb4touch/sdb4/(1..3000), the TXT code shows no space because the Innode is full of DF-h View Space DF-sh/SDB4 the size of the statistics file corresponds to the second half of LL-di/test to view the Innode number of the directory LS/Test directory holds file name lsInnode number of file name under-i/test directory

After you delete the file, you can recover the reason: the operation is removed only by the hard disk cover.

The deletion of files is found through the Innode block under the directory of the file Innode then clears the block link relationship within the directory through the pointer, if the innode is not recoverable during this period, and can be resumed if not occupied.

Soft connections and Hard links

1. File system mount and unload (see Linux System Management P406)
1) Master the definition of Mount: Mount refers to a device (typically a storage device) that is attached to an existing directory.
2) Master the function of the Mount command: Implement file system mount.
3) flexibly apply mount command to mount the file system:
For example: Mount the/DEV/SDB1 partition to a command on the/WG directory:
Mount/dev/sdb1/wg
4) Master the function of the Umount command: the implementation of the file system uninstall.
5) Flexible application of the Umount command to implement file system uninstallation:
For example, the command to uninstall the file system on/WG:
Umount/wg
2. Virtual memory concept and setup and management (see Linux System Management P414)
1) Master the definition of virtual memory: the so-called virtual memory is a piece of hard disk space is used as memory, also known as swap partition (swap).
2) Understand the type of Linux swap partition: 0x82
3) Master the function of the Mkswap command: Set the swap partition.
4) Master the use of the Mkswap command to set the swap partition usage example:
Example: the command to set partition/DEV/SDB2 to swap partition: MKSWAP/DEV/SDB2
5) Master the function of the Swapon command: Start the swap partition.
6) Master the function of the Swapon–a command: Start all swap partitions.
7) Mastering the function of the swapon–s command: Lists the status of all system swap partitions that are currently in use.
8) Master the use of the Swapon command example:
For example: Enable the Swap partition/DEV/SDB2 command: SWAPON/DEV/SDB2
3.I node (see Linux System Management P170)
1) Master the definition of the I node: the I node is actually a data structure that holds basic information about an ordinary file, directory, or other file system object.
4. Symbolic (soft) links (see Linux System Management P174)
1) Master the definition of Symbolic link: a symbolic link is a file that points to another file.
2) to master the use of the LN command to create a soft connection:
A) Create a dog_ wolf.boy symbolic link to the Wolf/dog.wolf.baby file and place the command in the Bodydog directory:
Ln–s Wolf/dog.wolf.baby Bodydog/dog_ Wolf.boy
5. Hard links (see Linux System Management P179) non-spanned partitions
1) Master the definition of a hard link: A hard link is a file name and an I node of the corresponding relationship, you can also consider a hard link to the corresponding file added an additional path name.
2) An example of the use of the LN command to create a hard connection:
A) Create a hard-link command named WOLF.DOG2 in the backup directory for the Wolf/wolf.dog file:
ln Wolf/wolf.dog BACKUP/WOLF.DOG2
File types in 6.Linux systems (see Linux System Management P183)
1) Master the common types of files in Linux systems:
-: Normal files (regular file), also known as regular files.
D: catalog (directory).
L: symbol (soft) link.
B: Block Special file (b is the 1th character of Block), generally refers to block device, such as hard disk.
C: Character special file (c is the 1th character of character), generally refers to a character device, such as a keyboard.
7. How to check disk space (see Linux System Management P185)
1) Master the function of the DF command: Displays the number of disk usage and idle areas in the file system.
-A Show All disks
-H Unit conversion
2) Mastering the functions of the du command: Display directory and file size a h ibid.

Left soft connection. Hard links on the right.

Partly selected from Lamb teacher Blog Http://www.cnblogs.com/linhaifeng/articles/6045600.html#_label15

Little white Python Road 10/31&11/1 file operating 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.