In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains what type of file the picture in linux belongs to. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what kind of files do pictures in linux belong to?"
Pictures in linux are normal file types. Linux has seven file types: ordinary file type, directory file, block device file, character device, etc., among them, the characteristic of ordinary file type is that it does not contain the structure information of file system information, usually the files that users come into contact with, such as graphics files, data files, sound files, etc., all belong to this file type.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Pictures in linux are normal file types. Documents in doc, ppt, zip, jpg, jpeg, gif, bmp, png and other formats under windows all belong to ordinary files under linux.
Linux has seven file types:
1. Common file types
The most commonly used class of files, characterized by no structural information that contains file system information. Usually, the files that users come into contact with, such as graphics files, data files, document files and sound files, all belong to this kind of files. According to their internal structure, this type of files can be divided into plain text files (ASCII), binary files (binary), data format files (data), and various compressed files.
Plain text file (ASCII): this is the most common file type in Unix systems. It is called plain text file because of the data that the content can read directly, such as numbers, letters, and so on. Almost all of the setup files belong to this file type. For example, use the command "cat ~ / .bashrc" to see the contents of the file (cat is to read the contents of the file).
Binaries (binary): the system actually only knows and can execute binaries (binary file). Executable files in Linux (scripts, text-based batch files are not counted) are in this format. For example, the command cat is a binary file.
Data format files (data): some programs will read files in certain formats while running, and those files in a specific format can be called data files (data file). For example, when a user logs in, Linux records the login data in the / var/log/wtmp file, which is a data file that can be read through the last command. But when using cat, the garbled code will be read out. Because it belongs to a special format.
2. Directory file
This is the directory, which can be accessed with the # cd command. The first attribute is [d], for example, [drwxrwxrwx]
3. 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]
4. Character equipment
Character device file: the interface device of the serial port, such as keyboard, mouse, etc. The first attribute is [c]
5. 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
6. Pipeline 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]
7. Link the file
Similar to the shortcut below Windows. The first property is [l], for example, [lrwxrwxrwx]
Extended knowledge: three ways to view file types
1. Ls-l/ls-ld or ll [ls-l-View file ls-ld-View path ll-same as ls-l]
Ll anaconda-ks.cfg / / look at the first character-rw-. 1 root root 2460 June 1 23:37 anaconda-ks.cfg [root@localhost log] # ls-ld / etc drwxr-xr-x. 81 root root 4096 Jan 29 03:25 / etc
2. File command
[root@localhost data] # file a.txt a.txt: ASCII text
3. Stat command
[root@localhost data] # stat a.txt / / View the detailed attributes of the file (including the file time attribute) File: `a.txt' Size: 3 Blocks: 8 IO Block: 4096 regular fileDevice: 803h/2051d Inode: 544365 Links: 1Access: (0644 root RWMART -) Uid: (0 / root) Gid: (0 / Root) Access: 2018-01-28 20 0800Change 56 root 01.965885036 + 0800Modify: 2018-01-28 20 purl 55 veg 27.1876154 + 0800Change: 2018-01-28 20 20 purl 55 purl 27.1876154 + 0800 to this point I believe that everyone on the "linux pictures belong to what type of file" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.