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 files does data belong to in linux

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what files data belongs to in linux". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "What files do data belong to in Linux"!

In linux, data is a file in data format; during the process of running the program, it will read some files in a specific format, which is the data file "data file". The data file can be read by using the last command, but when using cat, it will read garbled characters.

Operating environment: Linux 7.3 system, Dell G3 computer.

What is Data in Linux?

Data file format: Some programs read files in certain formats during their operation, and those files in certain formats can be called data files. For example, Linux logs login data when a user logs in to/var/log/wtmp, a data file that can be read by the last command. When using cat, however, garbled characters are read. Because it's a file in a special format.

expanding knowledge

Regular file: A file that is generally accessible, the first attribute displayed by ls -al is [-], for example [-rwxrwxrwx]. In addition, according to the content of the document, it can be roughly divided into:

Plain text file (ASCII): This is the most common file type in Unix systems. It is called plain text file because the content can be read directly, such as numbers, letters, etc. Almost all configuration files belong to this file type. For example, use the command "cat ~/. rc"to see the contents of the file (cat reads out the file contents).

Binary file: The system actually only knows and can execute binary files. Executable files in Linux (scripts, excluding text-based batch files) are in this format. For example, the command cat is a binary file.

3, data format files (data): Some programs in the process of running, will read some specific format files, those specific format files can be called data files (data file). For example, Linux logs login data when a user logs in to/var/log/wtmp, a data file that can be read by the last command. When using cat, however, garbled characters are read. Because it's a file in a special format.

Directory: A directory with the first attribute [d], such as [drwxrwxrwx].

Link file: Similar to Windows shortcut below. The first attribute is [l], for example [lrwxrwxrwx].

Device files: Files related to system peripherals and storage, usually concentrated in the/dev directory. It is usually divided into two categories:

Block device file: An interface device that stores data for system access, simply a hard disk. For example, hard disk number 1 has the code/dev/hda1 and so on. The first attribute is [b].

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

Sockets: These files are usually used for network data connections. A program can be started to listen for client requests, and clients can communicate data via sockets. The first attribute is [s], a file type most commonly seen in the/var/run directory.

FIFO (pipe): FIFO is also a special file type, its main purpose is to solve the problem caused by multiple programs accessing a file at the same time. FIFO stands for first-in-first-out. The first attribute is [p].

At this point, I believe that everyone has a deeper understanding of "what files data belongs to in linux", so you may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

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

Servers

Wechat

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

12
Report