Linux Knowledge Point Supplements

Source: Internet
Author: User

file name

Under Linux, the file name of each file or directory can reach a maximum of 255 characters, plus the full path, up to 4,096 characters long;

Due to the Linux in the text interface some of the instructions to operate the relationship, in general, you set the name of the file under Linux, it is best to avoid some special characters better! For example, these are:
* ? > <; &! [ ] | \ ' "' () {}
Because these symbols in the text interface, there is a special meaning! In addition, the file name begins with the decimal point "." , this file is a "hidden file"! Also, since the command is released, you will often use parameters such as-option, so you'd better avoid naming the file name at the beginning of-or +!


The FHS (http://www.pathname.com/fhs/) is actually just a specification of what kind of files should be placed under the root directory (/) for each major directory. FHS defines the two-layer specification, the first layer is/under the various directories should be placed on what kind of content of the file data, such as/etc should be placed in the configuration file,/bin and/sbin should be placed executable files and so on. The second tier is defined for the sub-directories of the/USR and/var directories. For example,/var/log places system login files,/usr/share places shared data, and so on.


Disk partitioning

What are the limitations of the main boot sector (Master boot Recorder, MBR)? His biggest limit comes from his size is not big enough to store all the information about the split and boot management program, so the MBR only provides memory for up to four partition, which is called Primary (P) the partition with Extended (E) can only have a maximum of four reasons.


The logical block is the specified "minimum storage unit" when partition is formatted for filesystem, and this minimum storage unit is of course the size of the sector structure.
Above (because the sector is the smallest physical storage unit of the hard disk!), so the size of the Block is the sector of the 2 of the second multiplier.


Block unit planning is not the bigger the better! Because a block can hold a maximum of one file (this is the Linux ext2 file system)! What's the problem? For example, if your Block is planned to be 4 Kbytes, and you have a file size of 0 .1 Kbytes, this small file will occupy a Block of space.


Superblock: As we said earlier, when we are doing disk partitioning (partition), each disk split slot (partition) is a file system (filesystem), and the block where each file system starts is called Superblock, Superblock's role is to store the size of the file system, empty and filled chunks, and his individual totals and other such information, and so on, which means that when you want to use this disk partition slot (or file system) for data access, the first
One thing to go through is the Superblock block.


Ext2 File System

In the standard ext2 file system, we divide the contents of each file into two parts, one is the attribute of the file and the other is the contents of the file. To cope with these two different ext2, the inode and block are programmed to store the attributes of the file (in the Inode) and the contents of the file (placed in the block area) separately. When we want to format a partition to Ext2, we have to specify the size of the inode and Block, that is, when partition is formatted as a ext2 file system, he must have inode table and b The two areas of lock area.

Inode record information (of course, more than that):
? The owner and group of the file (Owner/group);
? The access mode of the file (Read/write/excute);
? The type of the file (type);
? The time the file was established or changed (CTime), the last Read time (atime), the last Modified time (mtime);
? The capacity of the file;
? Flags (flag) defining the profile characteristics, such as SetUID ...;
? The direction of the real content of the file (pointer);

Refer to "Bird's private Cuisine"


Linux Knowledge Point Supplements

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.