Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the file types of the Linux system

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Linux system file types, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Everything in the Linux system is a file, so there will be different file types, generally speaking, there will be a total of seven types, let's take a look at the specific differences of these seven file types.

Linux system file types: normal file types

One of the most common file types in Linux, including plain text files (ASCII), binary files (binary), data format files (data), and various compressed files. The first attribute is [-]

Catalog file

This is the directory, which can be accessed with the # cd command. The first attribute is [d], for example, [drwxrwxrwx]

Block device file

Block device file: an interface device that stores data for system access, simply a hard disk. For example, the code of hard disk No.1 is / dev/hda1 and other files. The first attribute is [b]

Character equipment

Character device file: the interface device of the serial port, such as keyboard, mouse, etc. The first attribute is [c]

Socket file

Such files are usually used for network data connections. You can start a program to listen to the client's requirements, and the client can communicate through sockets. The first attribute is [s], which is most commonly seen in the / var/run directory

Pipe file

FIFO is also a special file type, and its main purpose is to solve errors caused by multiple programs accessing a file at the same time. FIFO is the abbreviation of first-in-first-out (first in first out). The first attribute is [p]

Link file

Similar to the shortcut below Windows. The first property is [l], for example, [lrwxrwxrwx]

Case demonstration: 1 ls

Ls-l or ll (ls-l alias)

# ll anaconda-ks.cfg? / / look at the first character-rw-. 1 root root 2460 June? 1 23:37 anaconda-ks.cfg2 file command

[root@xiaochen ~] # file anaconda-ks.cfg anaconda-ks.cfg: ASCII English text3 stat command

Stat command to view the file ctime atime mtime

# stat anaconda-ks.cfg? File: 'anaconda-ks.cfg'? Size: 2592? Blocks: 8? IO Block: 4096? Regular file Device: 803h/2051d Inode: 33574996?? Links: 1 Access: (0600 Mae? RW -)? Uid: (? 0 /? root)? Gid: (?? 0 /? root) Access: 2018-09-20 05 Gid 57 Change: 35.329041552 + 0800 Modify: 2018-09-20 05 Gid 35.334041552 + 0800 Change: 2018-09-20 05 Change 5735.334041552 + 0800? Birth:-[root@master] # stat / dev/null? File:'/ dev/null'? Size: 0? Blocks: 0? IO Block: 4096? Character special file Device: 5h/5d Inode: 5930? Links: 1?? Device type: 1 Access 3 Access: (0666) Uid: (? 0 /? root)? Gid: (?? 0 /?? root) Access: 2019-01-21 16 Gid 27V 54.255000135 + 0800 Modify: 2019-01-21 16V 27Gid 54.255000135 + 0800 Change: 2019-01-21 16V 27Gid 54.255000135 + 0800? Birth:-what are the versions of Linux available: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

After reading the above, have you mastered the methods of Linux system file types? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report