Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux file system structure Introduction     - MySQL5.6.17 compiler installation under CentOS (Database)

- Cryptography development environment to build under Ubuntu (Linux)

- Packages with Snort intrusion monitoring light (Linux)

- After the first remote installation GlassFish Web to remotely access their back office management system error solution appears (Server)

- Thinking in Java study notes - Generics (Programming)

- Docker - for the development and deployment of unified lightweight Linux containers (Linux)

- Database start listening TNS-12537, TNS-12560 error (Database)

- Analysis of Java reflection mechanism (Programming)

- Node.js simple interface server (Server)

- Linux Change ssh port and disable remote root login at (Linux)

- Machine Learning: Classification of the curse of dimensionality (Programming)

- Install Ruby on Rails in Ubuntu 15.04 in (Linux)

- Basic data types JavaScript type system and the type of packaging (Programming)

- Two programs HAProxy + Heartbeat (note, the secondary server vip, normal HAProxy boot method) (Server)

- PHP loop reference caused strange problems (Programming)

- SpringMVC the use of interceptors (Programming)

- Figlet use (Linux)

- Guide: Trickle restrict application bandwidth usage (Linux)

- Tomcat itself through simple movement separation (Server)

- Linux installed xdotool simulate keystrokes and mouse movements (Linux)

  Linux file system structure Introduction
  Add Date : 2017-01-08      
  What the document is Linux? What is its file system is? Those profiles, then where? I downloaded the program where to save it? In the Linux file system is the standard configuration it? Well, on the map concisely explain the hierarchy of the Linux file system. When you're struggling to find the configuration file or binary file, which it appears to be very useful. Below I added some explanation and examples, but "lengthy, it can be free to look."

Another case is when you get the configuration and binary files in the system, there has been inconsistency, if you are in a large organization, or just an end user, it might also destroy your system (for example, binaries run on the old library files). If so, what do you do a security audit on your Linux system, you will find it very vulnerable to various attacks. So, maintain a clean operating system (either Windows or Linux) are very important.

What Linux files are?

For UNIX systems (also for Linux), the following is a brief description of the file:

On UNIX systems, everything is a file; if not file, for the process

This definition is more correct, as some special files not just an ordinary file (such as named pipes and sockets), but to make things simple, "everything is a file" is an acceptable argument . Linux systems like UNIX systems, files and directories as visual objects, just because the directory that contains other file names only. Programs, services, text, images, etc., are all files. For the system, the input and output devices, substantially all of the equipment, are treated as a file.

Topic map Version History:

Version 2.0 - 17-06-2015
- Improved: add a title and version history
- Improved: add the / srv, / meida and / proc
- Improved: Updated to reflect current Linux file system description
- Fixed: multiple printing error
- Fixed: appearance and color
Version 1.0 - 14-02-2015
- Created: Basic Chart
- Note: abandon lower version

Linux file system descriptor

In order to manage those files in an orderly manner, people used these documents as ordered tree structure on the hard disk, as we are familiar with 'MS-DOS' (Disk Operating System) is an example. Large branches contain more branches, leaves or branches endings are normal file tree. Now we will be in this tree, for example, late but we'll find out why this is not a completely accurate a picture.

Directory Description
/ Primary level root is the root directory of the entire file system hierarchy
/ Bin stored in single-user mode available the necessary command binaries, available to all users, such as cat, ls, cp, etc.
/ Boot storage boot loader file, for example, kernels, initrd etc.
/ Dev file storage necessary equipment, such as / dev / null
/ Etc stored host-specific system-wide configuration files. In fact, there is a name on its own sense of controversy. In earlier versions of the UNIX implementation of the document in Bell Labs, / etc represents "other (etcetera) catalog," because historically, this directory is located does not belong to a variety of other directories of files (however, the standard file system directory FSH Limited / etc used to store static configuration file, there should not be here binaries). After the early publication of the document, the name of the directory again defined as different forms. Recent interpretation contains "editable text configuration" or "extra kit" such as redefinition
/ Etc / opt to store the new package configuration file / opt /.
/ Etc / sgml store configuration files, such as catalogs, for those dealing with SGML (Translator's Note: Standard Generalized Markup Language) software configuration files
11 version of / etc / X11 X Window System configuration files
/ Etc / xml configuration files, such as catalogs, for those dealing with XML (Translator's Note: Extensible Markup Language) software configuration files
/ Home user's home directory, including the saved files, personal profile, etc.
Required library files / lib / bin / and / sbin / binary files
/ Lib necessary library file backup format. Such a directory is optional, but if they exist, then there is definitely a need to use their program
/ Mobile multimedia media (such as CD-ROMs) mount point. (Appeared in FHS-2.3)
/ Mnt temporary mount file systems
/ Opt Optional application packages
/ Proc process and provide information to the kernel files in the form of a virtual file system in Linux, the corresponding process file system (procfs) mount point
/ Root-root user's home directory
/ Sbin necessary system-level binary file, for example, init, ip, mount
Site-specific data / srv system provides
/ Tmp Temporary files (see also / var / tmp). Usually after a system reboot delete
/ Usr read-only two-level store user data; contains a (multi) user public key files and applications
/ Usr / bin non-essential command binaries (not needed in single-user mode used); for all users
/ Usr / include standard include file
/ Usr / lib library files for / usr / bin / and / usr / sbin / binaries
/ Usr / lib alternate format library (optional)
/ Usr / local for three levels of local data, specific to the host. There is usually a subdirectory, for example, bin /, lib /, share /.
/ Usr / local / sbin non-essential system binaries, such as for different network services daemon
/ Usr / share architecture-independent (shared) data.
/ Usr / src source code, such as the kernel source files and header files associated with it
/ Usr / X11R6 X Window system, version numbers: 11, Release: 6
/ Var variety of (Variable) file, some of the conventional operation system with continually changing files put here, such as log files, offline files, and temporary e-mail files
/ Var / cache application cache data. The data is time-consuming operation I or locally generated results / O (input / output). These applications are able to regenerate or restore the data. When no data is lost, you can delete cache files
/ Var / lib status information. This information along with operating procedures and constantly changing, for example, databases, packaging system metadata, etc.
/ Var / lock lock file. These files are used to track the resources being used
/ Var / log log file. It contains various log.
/ Var / mail contains the user's mailbox relevant documents
/ Var / opt from a variety of data are stored in the add-on package / var / opt /.
/ Var / run to store information about the current system since the last start, such as the current logged in user, and the currently running daemons (daemon).
/ Var / spool The spool is mainly used to store tasks to be processed, such as print queues and queue outbound e-mail
/ Var / mail outdated location for placing the user's mailbox file
/ Var / tmp to store temporary files after restart reserved

Linux file type

Most file is just a regular file, they are called regular files; they contain normal data, such as text, executable files or programs, input or output programs, etc.

Although you may think "in Linux, all you see are all files" this view pretty safe, but there is still some exceptions.

Directory: file consists of other files
Special Files: Ways for input and output. Most special files are stored in / dev, we will discuss this issue later.
Link File: Allows file or directory appears in the file system tree mechanism multiple locations. We will discuss this in detail with the linked file.
(Domain) sockets: a special file type, and TCP / IP protocol bit like sockets, providing inter-process communication network, and file system access control mechanisms protected.
Named Pipes: more or less like sockets (sockets) to provide a mechanism for inter-process communication, without network sockets.

The reality of the file system

For most users, and general system management tasks, "files and directories is an ordered tree-structure" is acceptable. However, for the computer and it is not going to understand what is a tree, or what is the tree structure.

Each partition has its own file system. Imagine, if you want to put those file systems as a whole, we conceived a tree structure on the whole system, but this is not so simple. In the file system, a file representing a inode (index node), which is a build file that contains the serial number of the actual data information: These data indicates that the file belongs to whom, as well as its location on the hard disk.

Each partition has a set of their own inode, in different partitions of a system, there can have the same inode file.

Each inode represents a kind of data structure on the hard disk, save the file attributes, including the physical address of the file data. When the hard disk is formatted and used to store data (usually occurs during the initial system installation process or in an existing system to add additional hard disk), each partition will create a fixed number of inode. This value represents the maximum number of partitions can also store all types of files. We usually go with a inode block map data of 2-8k. When a new file is generated, it will get a free inode. In this inode which stores the following information:

File owner and group owner
File types (regular files, directories, file ......)
File Permissions
Creation, last read and modified files of time
inode where the information was modified
The number of linked files (see next section)
File size
The address of the actual file data
Inode information is not the only file names and directories. They are stored in a special directory files. By comparing file names and inode numbers, the system can construct a tree structure for users to understand. Users can view the number of inode by ls -i. On the hard disk, inodes have their separate space.
- Compiling source code Nginx module installation subs_filter (Server)
- Swift notes - let you two hours to learn Swift (Programming)
- Basic data types JavaScript type system and the type of packaging (Programming)
- Using the Linux folder wc statistics number of lines of code for all files (including subdirectories) (Linux)
- Based AutoYaST automated installation of SUSE practice (Linux)
- How to network to share files between Windows, MAC and Linux (Linux)
- VMware difference in three network connection (Linux)
- Https (SSL / TLS) Detailed principles (Server)
- How to recover deleted files in Linux systems (Linux)
- Java singleton mode (Singleton mode) (Programming)
- Linux shell scripts bubble sort (Programming)
- Linux Timing task Crontab command Detailed (Linux)
- Ubuntu Linux Change the PATH (Linux)
- Under CentOS Linux automatic backup MySQL database daily (Database)
- MySQL rollback insert statement causes ibd file grows double (Database)
- JITwatch installation under Linux (Linux)
- Linux 6 install Oracle 11g (64bit) (Database)
- Configuring LIDS build Linux kernel security intrusion detection system (Linux)
- Debian (Wheezy) were installed wxPython GUI development (Linux)
- Examples of Python any parameters (Programming)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.