Linux file system foundation

xiaoxiao2021-03-06  96

Linux file system foundation 2002-9-23 8:45:30 Read 1508 times

Linux file system basic one, Linux file structure file structure is an organizational approach to a file stored in a storage device such as disk. Mainly reflected in the organization of documents and catalogs. The directory provides a convenient and effective way to manage files. Linux uses standard directory structures, when installed, the installer has created a file system and a completely fixed directory composition form, and specifies the role of each directory and the file type. / Root Catalog ┏┏━━┳┳┳━━┳┳━━━┳┳┳━━━╋╋━━━┳┳┳━━━┳┳┳━━━┳┳┳━━━ ┓ ┓ ┓ e e ┏ ┻ ┻ ┻ ┻ ┳ ┏ ┏ ┏ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ ┏ , ┏ ┏ ┏ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ,,, R r 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构 结构. The uppermost layer is the root directory, and all other directories are generated from the root directory. Microsoft's DOS and Windows also use a tree structure, but the root of such a tree structure in DOS and Windows is the disk partition of the disk partition. There are several partitions, and the relationship between them is connected. of. But in Linux, no matter how many disk partitions are managed, such a directory tree is only one. Structurally, the tree directory on each disk partition is not necessarily parallel. If this is not understood, I will give an example: there is a hard disk, divided into 4 partitions, is /; / boot; / usr and windows FAT for / and / boot or / and / usr, they It is a dependency; for / boot and / usr, they are parallel. If I mount the FAT partition under Windows to / MNT / Winc, (Mount ??, don't worry, huh, I will talk, I will speak.) So for / MNT / WINC and / USR or / MNT / WINC and / BOOT, they are two branches that have no relationships belonging to the directory tree. Because Linux is a multi-user system, making a fixed directory plan helps to manage system files and different user files. But this is a headache that makes many beginners who go from Windows to Linux. Some of the functions of some of Linux is listed below. / bin binary executable command / dev device Special file / etc. System management and configuration file /etc/rc.d start configuring the profile and the base point of the script / home user home directory, such as the user user's main directory is / home / user, You can use ~ user to reply the / lib standard program design library, also called dynamic link sharing libraries, effect similar to the .dll file / sbin system management command in Windows, where the system administrator used by the system administrator / TMP public temporary file The main directory of the storage point / root system administrator (Oh, privilege class) / MNT system provides this directory that allows users to mount other file systems. / Lost Found This directory is empty, and the system is abnormal and left "homeless" file (what is called under Windows. Chk) is here / proc virtual directory, is a mapping of system memory. You can access this directory directly to get system information. / Var's overflow area of ​​some large files, for example, the largest catalog of various services, the applications and files you want to use are almost in this directory.

Which: / usr / x11r6 stores x window directory / USR / BIN numerous application / USR / SBIN Super User Some Manager / USR / DOC Linux Document / USR / include Linux Under development and compile applications Header file / usr / libly dynamic link library and package configuration file / usr / man help document / usr / src source code, Linux kernel source code is placed in / usr / src / linux / usr / local / BIN Locally Added Command / USR / LOCAL / LIB Local Increased Library II, Linux File System File System File The physical space exists, each partition in the Linux system is a file system, which has its own directory hierarchy. Linux will form a system's total directory hierarchy in a certain manner of different partitions, separate file systems. The operation of an operating system is inseparable from the operation of the file, so it is inevitable to have and maintain its file system. The Linux file system uses an index node to record file information, and the file allocation table like Windows is used. The index node is a structure that contains the length, creation, and modification of time, permissions, dependencies, and where the location is located. A file system maintains an array of index nodes, each file or directory corresponds to the only element in the index node array. The system assigns a number to each index node, that is, the index number of the node in the array called the index node. The Linux file system saves the file index node number and the file name in the directory. Therefore, the directory is just a table that combines the name of the file and its index node number, and each pair of file names and index nodes in the directory are called a connection. For a file, there is a unique index node number corresponding to an index node, but there can be multiple file names and corresponding. Therefore, the same file on the disk can be accessed through different paths. You can use the ln command to build a new connection to a file that already exists without copying the contents of the file. Connecting a soft connection and hard connection, soft connection is also called a symbolic connection. Their respective features are: hard connection: The original file name and connection file name point to the same physical address. The directory cannot have a hard connection; the hard connection cannot leapfly with the file system (cannot span different partitions) files only one copy in the disk, saving a hard disk space; because the delete file is to be successful, it can be successful when the same index node is a unique connection, so you can Prevent unnecessary misunderstandings. Symbol connection: Symbol connection symbolic connection with ln -s commands is a kind of Linux special file, as a file, its data is the path name of the file it connects. Similar to shortcuts under WINDOWS. You can delete the original file and save the connection file without preventing erroneous deletion. The content of this paragraph is too abstract, and it is another array of nodes. I have tried to be popular again, and it is not good to add an example. If everyone is still in the cloud, there is no way, only to remember, and slowly understand in practical applications in the future, understand. This is also a way I have learned. Third, the mounting file system is known from the previous section, and each partition in the Linux system is a file system, which has its own directory hierarchy. Linux will form a system's total directory hierarchy in a certain manner of different partitions, separate file systems. The "in a certain way" herein refers to the mount. Hill the top directory of a file system to the subdirectory of another file system, so that they become a whole called mount. The subdirectory is called a mount point.

For example: Root partition: / root catalog ┏┏━━┳┳━━━┳┳━━━┳┳┳━━━╋╋━━━━┳┳━━━━ ━━┳┳━━━┓ ┓ ┓,, e e e e ar ar ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳ ┳┳┻┻┳┳┳━┓┓ ┓ ┓, it it it it it it it r ... ... ... ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ┏ ┏ ╋ ┏ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ╋ ━━┳┳━┓ ┓ ┓, ┏ ┏ ┏ ┏ ╋ ━ ┓ ┏ ┏ ┏ 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文 文That figure. Isn't it like hanging? Note: 1. The mount point must be a directory. 2, a partition mounted on an existing directory, this directory may not be empty, but the previous content will not be available after mount this directory. This is the same for the file system established by other operating systems. However, it is necessary to understand that the format of the file system used by the disc, floppy disk, and other operating systems is different from Linux file system format. The disc is ISO9660; floppy disk is FAT16 or EXT2; Windows NT is FAT16, NTFS; Windows 98 is FAT16, FAT32; Windows2000 and WindowsXP are FAT16, FAT32, NTFS. Learn if Linux supports the file system format you want to mount before mount. Using the mount command while mount: format: mount [- parameter] [device name] [mount point] where the common parameters are -t Specify the file system type of the device, common: MiniX Linux first File system EXT2 Linux currently common file system MSDOS MS-DOS's FAT, is the FAT16 VFAT Windows 98 Common FAT32 NFS Network File System ISO9660 CD-ROM CD Standard File System NTFS Windows NT 2000 File System HPFS OS / 2 File System AUTO Automatically detect file system -o

转载请注明原文地址:https://www.9cbs.com/read-97389.html

New Post(0)