


What type of file is a picture in Linux?
Pictures in Linux are ordinary file types. Linux has seven file types: ordinary file types, directory files, block device files, character devices, etc.; among them, the characteristic of ordinary file types is that they do not contain structural information with file system information. Files that are usually exposed to users, 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 ordinary file types. Documents in doc, ppt, zip, jpg, jpeg, gif, bmp, png and other formats under windows are all ordinary files under Linux.
Linux has seven file types:
1, Common file type
The most commonly used type of file, Its characteristic is that it does not contain structural information of file system information. Usually files that users come into contact with, such as graphic files, data files, document files and sound files, all belong to this type of file. This type of file can be divided into plain text files according to its internal structure ( 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 a plain text file because the content can be read directly, such as Numbers, letters, etc. Setting files almost always belong to this file type. For example, use the command "cat ~/.bashrc" to see the contents of the file (cat reads the contents of the file).
Binary file: The system actually only recognizes and can execute binary files. Executable files in Linux (scripts, text batch files are not included) 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 during operation. Those files in specific formats can be called data files. ). For example, when a user logs in, Linux will record the login data in the /var/log/wtmp file. This file is a data file that can be read out through the last command. But when using cat, garbled characters will be read. Because it is a file in a special format.
2. Directory file
is the directory, which can be entered using the # cd command. The first attribute is [d], for example [drwxrwxrwx]
3. Block device file
Block device file: It is an interface device that stores data for system access. In simple terms, it is harddisk. For example, the code of hard disk No. 1 is /dev/hda1 and other files. The first attribute is [b]
4. Character device
Character device file: the interface device of the serial port, such as keyboard, mouse, etc. The first attribute is [c]
5. Socket file
This type of file is usually used in network data connections. A program can be started to listen for client requests, and the client can communicate data through the socket. The first attribute is [s]. This file type is most commonly seen in the /var/run directory.
6. Pipe file
FIFO is also a special file type. The 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. The first attribute is [p]
7, and the link file
is similar to the shortcut under Windows. The first attribute is [l], for example [lrwxrwxrwx]
Extended knowledge: three ways to view file types
1, ls-l/ls-ld Or ll [ls-l — view the file ls-ld — view the path ll ---- same as ls -l]
ll anaconda-ks.cfg //看第一个字符 -rw-------. 1 root root 2460 6月 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 //查看文件的详细属性(其中包括文件时间属性) File: `a.txt' Size: 3 Blocks: 8 IO Block: 4096 regular file Device: 803h/2051d Inode: 544365 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2018-01-28 20:56:01.965885036 +0800 Modify: 2018-01-28 20:55:27.181876154 +0800 Change: 2018-01-28 20:55:27.181876154 +0800
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What type of file is a picture in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Gate.io is a highly acclaimed cryptocurrency trading platform known for its extensive token selection, low transaction fees and a user-friendly interface. With its advanced security features and excellent customer service, Gate.io provides traders with a reliable and convenient cryptocurrency trading environment. If you want to join Gate.io, please click the link provided to download the official registration installation package to start your cryptocurrency trading journey.

This tutorial guides you through installing and configuring Nginx and phpMyAdmin on an Ubuntu system, potentially alongside an existing Apache server. We'll cover setting up Nginx, resolving potential port conflicts with Apache, installing MariaDB (
