Linux file system

Source: Internet
Author: User
Tags parent directory

File system:

The file is divided into two parts:

Metadata: Describing the properties of a file

Data: The contents of a file

Hierarchical addressing methods:

In the file system, file access is based on the file name, which is referenced by name.

In the file system, there are a series of rules for file names;

1. The file name cannot contain "/" characters;

"/": Represents the root filesystem; the so-called root file system, which is the original starting point for Linux files;

"/": Indicates the delimiter of the path;

2. The file name cannot exceed 255 characters in length;

3. In the same location, the file name cannot be reused;

4. File names are strictly case-sensitive; (Linux systems are case-insensitive, case-sensitive file systems)

The file system uses the concept of a path to identify the location of the file: The path is the set of hierarchy of directories that must go through when locating a file location;

The path in the file system is described in the following way:

Absolute path:

Everything starts with "/" to find the path;

Relative path:

Everything starts with the "Current working directory" to find the path;

“.” : Indicates the current working directory;

“..” : Represents the parent directory of the current working directory (top level directory);

So it can also be said that everything with "." or ".." The path to start looking for is called the relative path, and when you use "." When the current working directory is represented, it can be omitted;

How do I select a path? Select relative path or absolute path?

If the target file and the current directory are not on the way, the absolute path is used, if the relative path is used;

By the way: the current working directory is included in the absolute path;

Home directory:

The default current working directory for each user who logs on to the system, and the starting directory for each user;

Also known as "Home Directory"

Either path is actually a two-part composition:

The base name of the file:

BaseName

Directory name of the file:

DirName


This article from "13366421" blog, declined reprint!

Linux 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.