Linux File types detailed

Source: Internet
Author: User
Tags system log temporary file storage file permissions

One, Linux file types: Ordinary files, directory files, linked files, device files, pipeline files.

1. Normal file: When the property is displayed by Ls-al, the first property is [-], for example [-rwxrwxrwx]. Including:
1, plain text file (ASCII): Is the content can be read directly to the data, such as numbers, letters and so on.
2 binary file (binary): Picture, audio, video files.
3. Data format file: Some programs will read files in a specific format, which can be called data files (datafile) in the process of running.

2. directory files (directories or folders), when the property is displayed by Ls-al, the first property is [d], such as: [DRWXRWXRWX].

3. Connection file (link): (shortcut). When a property is displayed by Ls-al, the first property is [l], such as [lrwxrwxrwx].

4, equipment and equipment files (device): corresponding to the Linux system peripherals and stored files, usually concentrated in the/dev directory. are divided into two types:
Block device files: Block devices support access in blocks, such as: one hard drive (/DEV/HDA1). The first property is [b].
Character device files: Character devices support access in a character unit, such as: Keyboard (/dev/input/event2), Mouse (/DEV/INPUT/MOUSE1). The first property is [C].
Sockets (Sockets): This type of file is typically used in network data connections. The first property is [s], (/var/run/acpid.socket)


5, Pipeline file (fifo,pipe): Pipeline files are mainly used for interprocess communication, FIFO is the abbreviation of First-in-first-out (first-in-one-out). The first property is [P]. (Can be created using the MKFIFO command)

Common file types and colors in Linux systems
A. Green (executable file) B. White (plain file) c. dark blue (catalogue)
D. Azure (linked file) E. yellow (device file) F. Red (Package)

Second, the Linux file attributes

There are four types of Linux file attributes:
1) Read (R) to display the contents of the file.
2) Write (w), you can edit or delete the file.
3) Execution (x), the file can be run.
4) No permissions (-), which means no permissions on the permission bit.

Third, Linux file permissions

The user classification of file permissions is divided into three categories:
1) The file belongs to the owner (U) and the user who created the file.
2) The same group of users (g), any user in the user group that owns the file.
3) other users (O), that is, a user who is not part of the user and does not belong to that user group.

Iv. Linux Main directory

/bin Important executable Files
/boot kernel file (preferably one partition)
/etc store configuration file (preferably one partition)
/home Normal User host directory (recommended for one partition)
/USR Store application (recommended for one partition)
/root Host directory (recommended for one partition)
/dev Store device files
/lib link library files
/MNT mount Floppy/CDROM/u disk, etc.
/tmp Temporary file storage
/var storage System log File

Linux File types detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.