[Linux] Basic concepts in Linux




1. Path separator/

/Linux path separator
\windows path separator



2. Current directory.



3. Return to the upper directory. .

Directory structure: multi-tree

Almost all operating systems, folders or directory structures aretree-like.

In the Linux system, the files and directories on the disk are organized into a directory tree, and each node is a directory or file.

Insert image description here

  • Any path has a unique parent node (saved by. . the superior path) => which lays the path < a i=3>Uniqueness This quality


4. Path

Path: A string of unique identifiers specifying the file in the multi-tree structure (determined by / (Path separator) A string of folders separated by a string) string

/root/110/code
root, 110 —> must be a directory/folder
code —> may be a file folder

The essence of the path: multi-tree search path (quick positioning) [ Uniqueness ]

5. Path = {absolute path + relative path}

  • Absolute path: Starting from the root directory to the leaf node you are looking for is called an absolute path.

/home/bit/test.c

  • Relative path: Find the path relative to the current location

. . /home/bit/test.c



6. * wildcard all files under the specified path



7. Files or directories with the same name are not allowed to exist in directories at the same level.



8. The essence of a command is an executable file



9. File = content + attributes

Essence: Operations on files = operations on content + operations on attributes

  • Thinking 1: Create a new empty file. Will this file occupy disk space?
    Answer: A file has no content and the size is indeed 0, but a file has a name, modification date, type, and size. These are calledproperties of the file.

  • Thinking 2: Are attributes data?
    The attributes of a file are data at a macro level. For example, the file name is a string and the size is an integer

  • File=content+attributes
    The attributes of the file must also be saved on the computer.
    Whether it is content or attributes, it is essentially data in the eyes of the computer.
    The file is saved on the disk or hard disk, that is, the content and attributes of the file are stored on the disk. Save on hard drive

Create a new empty file. This file will occupy disk space.

Guess you like

Origin blog.csdn.net/NiNi_suanfa/article/details/134004289