Cty's Linux study notes (seven)

Linux Study Notes - Part 7

Common file types in Linux:

Regular file: that is, a file of general type. The file that starts with "-" when viewed by the ls -l command can be divided into plain text files (ASCII) and binary files (binary). Plain text files can be used cat, more , less and other tools to view the content, but not binary files.

Directory (directory): files that start with "d" when viewed by the ls -l command.

Link file: A file that starts with "l" when viewed by the ls -l command.

Device (device): Some files related to the surrounding of the system are concentrated in the /dev directory and are divided into block (block) devices and character (character) devices, ls -l starts with "b" is a block device, and is "c" " is the character device.

 Link file for Linux:

Hard link (hard link): directly establish an inode link to the block area where the file is placed, and add an inode pointing to the file, which will not occupy additional disk space. Restrictions: (1) It cannot cross file systems. (2) The directory cannot be linked.

Soft link (symboblic link): establish a separate file, when reading this file, it will forward the read behavior to the file linked to the file.

Command:

ln:

    Format: ln [-s] [source file] [destination file]

    The commonly used option is -s. If you do not connect "-s", it is a hard link. If you add it, it is a soft link.

from:

    Used to calculate the size of a file or directory, -k means in kb

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325586733&siteId=291194637