Bird Brother Linux Private cuisine Knowledge points Summary 8 to 9 chapters

Source: Internet
Author: User
Tags disk usage

Recently turned to a "bird brother's Linux private dishes." This is a basic book, lofty high-rise floor, will not much but can learn. This is a few of my knowledge points, although very basic. Hope to share with you.


8th Linux disk and file system Management


First, Linux Disk Management

1, the file system will usually put two parts of the data in separate blocks,permissions and attributes placed into the InodeInThe actual data is put into the block of data blockIn
2. Locate the fileInode, you willknowThe data that is placed in this file.BlockNumber, you can read thethe actual data for the file, OH.
3. The file system used by U disk is generally fat format.
4. Defragmentation:to bring together the block that the same file belongs to by defragmenting it, which makes it easier to read the data.
5. There is a boot sector at the front of the file system, which can be installed with the boot loader.
6. Block size and quantity can not be changed after the format is finished.
7. The content of each block can only be placed in one file.
8. DF-----This command can be bring up the device that is currently mounted
9, when the Ext2 file system under Linux creates a directory, ext2 allocates an inode with at least one block to the directory.
10.Ls-i View the files in the root directoryinode number occupied。
11. When a new file is created under Linux ext2, Ext2 assigns an inode with the number of blocks relative to the file size to the file.
12, ^ (* ̄ (oo)  ̄) ^ Red Hat's chief kernel developer isMichaelk.johnson(Great God ah ah)
13.An operation that combines a file system with a directory tree, called a mount。
14, mount point must be a directory, the directory for entry into the file system.


simple operation of the file system
disk-to-directory capacity: Df,du
①DF: Lists the overall file systemamount of disk usage
du:EvaluationDisk usage of the file system (commonly used to estimate the capacity of the catalog)
②df-h It is displayed in the form of GB,MB,KB, which is easier to read.
Df-i does not use the hard disk capacity, the number of inode to display.
③du directly to file system to find all file data
Connection file: ln
There are two ways to link files in Linux ①: one is Windows-like shortcut functionsAble to quickly connect to the target file.
The other is generating new file names via Inode connections to the file systemInstead of new files, this is called Hard Connect
IiHard LinkJust create a new item in a directory The associated record of the file name connected to an inode numberOnly.
③ If you delete any file name, the Inode and block still exist.
④hard Link simply writes an associated data to the block in the directory, and irritation does not increase the inode and consumes the block number.
symbloclic Link (Symbolic links, which are shortcuts), are Create a stand-alone file, this file allows the data to be read The filename of the file to which it is connected


9th Linux disk and file system management


one, the use of compressed files and technology
1, the use of a number of complex computing methods, these The unused space is thrown out .To make the file occupy less space
Another is the statistical recording of repeated data.
Common compression Commands
*. Z COMPERSS Program Compressed Files
*.gz Files that are compressed by the GZIP program
*.bz2 BZIP2 Program Compressed Files
Gzip File name, compressed files using gzip in Windows system, can be decompressed with WinRAR

Package Command Tar
①windows's winrar also supports decompression of tar.gz filenames
② parameter:-j Compression/decompression via BZIP2 support
-Z Compression/decompression via GZIP support
-P Save the permissions and properties of the original file
③ View data contents of tar ' File: Tar-jtv-f/root/etc/tar/bz2
④ Unpacking: Tar -JXV-f/root/etc/tar/bz2
⑤ only unlocks a single file: Tar-jtv-f/root/etc/tar/bz2 | grep ' Shadow ' grep selects the function of the keyword
Unpack files: Tar-jxv-f package files. tar.bz2 file name to be unpacked
The ⑥ package directory, but does not contain some of the files in this directory practice:
Tar-jcv-f/root/system.tar.bz2--exclude=/root/etc* \
>--exclude=/root/system.tar.bz2/etc/root exclude is not meant to be included.
⑦ only back up new files than at some point
FIND/ETC- newer/etc/passwd

⑧ Backup of/home/root/etc to/DEV/ST0 tape drive: Tar -CV -f/dev/st0/home/root/etc


Backup command dump and restore

①restore-r restoring the entire file system

② querying the difference between a file system and a backup file: Restore-c-f/root/boot.dump


second, the CD-ROM writing tool
1, Process: will need backed-up dataBuilt as a image file ISO, UseMkisofsCommand
The image file BurnTo the disc, usingCdrecordCommand processing
2. Mkisofs: Create a new image file

Mkisofs-o image File

Finally, I like the sentence :

vision is above ability, ability is greater than income, this is the right track

Bird Brother Linux Private cuisine Knowledge points Summary 8 to 9 chapters

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.