Linux Basics--Understanding the file system

Source: Internet
Author: User
Tags system log

Overview: The operation of Linux files and directories, as a basic management, to understand the Linux file directory organizational structure "file system" is very necessary. We know that Linux has a lot of distributions, which is good to learn? In fact, there is no need to worry, the basic structure of the internal principles are similar, and there are relevant standards to define its specifications, so learning that version of Linux are very similar.


    1. FHS (Filesystem Hierarchy Standard):

      It defines that the Linux directory structure must be organized according to a certain standard, while the corresponding RFC official documentation is provided for reference.

    2. Files and directories are organized into a single inverted tree structure, as shown in: 650) this.width=650; "Src=" http://s5.51cto.com/wyfs02/M00/85/3D/ Wkiol1ed3rmdkhfeaae4vlqcsr4718.png "title=" Image 1.png "width=" "height=" 365 "border=" 0 "hspace=" 0 "vspace=" 0 " Style= "width:700px;height:365px;" alt= "Wkiol1ed3rmdkhfeaae4vlqcsr4718.png"/> (1)/:

      Linux file System (/) root is self-referencing, also known as the root file system (ROOTFS), in order to access the root file system file directory resources, must start from the root, other file systems to be accessed must also be linked to the tree.

(2)/bin:

It is the basic command that the ordinary user needs to use, it is the executable binary format file.

(3)/sbin:

It contains administrative commands that are used by administrative users, as well as executable binaries.


(4)/boot:

The system launches the directory where boot files are stored, with important Linux kernel kernel and bootloader,grub boot loader files.


(5)/dev:

It contains the device files, which are used to correlate the devices, and the types are described later.


(6)/etc:

It contains the configuration file, which is in plain text format.


(7)/home:

The user's home directory, under which the user's home directory has the same name as the user name.

(8)/root:

Home directory for system administrator root.


(9)/tmp:

Temporary file location, each user can create a file or directory, but only their own operation of their own files, of course, except administrator root.

(/lib,/lib64):

The storage is a library file, divided into 32-bit and 64-bit, under which the/lib/modules is the location of the core wood storage.

(one)/proc:

It is stored in the memory of the System Runtime kernel mapping file, so it is also called pseudo file system.

(/sys):

Like/proc, it's called a pseudo file system, but it's a hardware-related property mapping file that's stored in memory and not stored on disk.


(/media):

mount point directory, which provides the mounting of a mobile device.

(/MNT):

is also the mount point directory, which provides the mounting of additional device file systems.

()/usr:

Shared read-only files, the system is used to run the file, the following also have/usr/bin,/usr/sbin,/usr/lib, the function of the same front.

(+)/var:

It is stored in a variety of data files, mail, System log, application cache data and other changeable files.

(+)/srv:

The file storage location on which the system runs the service.


3. File System file Type:

According to one of the philosophical principles that Linux follows. All document ideas, whether it is hardware or other in the Linux system all performance as a file, the following describes the file type.

* Use the LS command and the file command to view the files type

(1)-: normal file.

(2) d: Directory, directory is also a file, directory is the mapping of file paths.

(3) B: One of the device file types, called the block device, the device Access feature is randomly accessed by block.


(4) C: One of the device file types, known as the character device, the device access characteristics are linear access, that is, sequential reading of data.

(5) L: Symbolic link file, also known as soft Connection file, its file size is the file name character size.

(6) P: Name piping file pipe.


(7) S: Socket file, which represents the port plus IP mapping relationship in the network, which refers to the associated file used by interprocess communication.


4. File command rules:

(1) The file name cannot be longer than 255 characters.

(2) cannot use root (/) when file name.

(3) The file name of the general common file system is strictly case-sensitive, for the additional mount of individual file system recognition requirements are not so strict, this refers to the FAT32 on Windows.


4. Summary:

The organization structure of Linux file system is the implementation of hierarchical management, and it is very good to locate and locate the system resources. In the management maintenance process to pay attention to file name naming specification, familiar with file types, to avoid the use of confusion.

This article is from the "Xiashixiang" blog, make sure to keep this source http://xiashixiang.blog.51cto.com/9232879/1832567

Linux Basics--Understanding the 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.