Linux file extension and type

Source: Internet
Author: User

Windows is a file type that is distinguished by extension

There is no relationship between the file extension root file types in Linux

In order to easily differentiate and be compatible with the user's habit of using Windows, we also use extensions to represent the types of files in Linux!

Everything in Linux is file. File types include: normal files, directories, character devices, block devices, symbolic links, etc.

[Email protected] ~]# ls-l

Total Dosage 132

-Rw-r--r--. 1 root root 2 November 8 14:25 A.log

-RW-------. 1 root root 1587 October 12:51 anaconda-ks.cfg

-Rw-r--r--. 1 root root 2 November 8 14:25 a.txt

drwxr-xr-x. 2 root root 4096 23:23 data October

L: Link File

-: Common file deletion method with rm command

D: Catalog file

View file types by: File command

Plain text files: content can be read directly, digital letters, etc.

Binaries: Executable files in Lnux, such as command files, cat LS CP

Data format files: Files with a specific format


Ls-f and Ls-p: Add a file after the directory

Character Device:

[Email protected] data]# ls-l/dev/tty

crw-rw-rw-. 1 root TTY 5, 0 November 8 09:34/dev/tty

Create a block and a character device: Mknod

Socket devices: Typically used for data connections between networks

[Email protected] data]# ls-l/dev/log

srw-rw-rw-. 1 root root 0 November 8 09:34/dev/log

Link file: Equivalent to a shortcut under Windows

[Email protected] data]# ls-l/ETC/INIT.D

lrwxrwxrwx. 1 root root 11 October 12:35/etc/init.d-RC.D/INIT.D

Ln-s source file name new file name

Pipeline file:

[Email protected] ~]# Find/var-type P|xargs ls-l

PRW-------. 1 root root 0 November 8 09:34/var/run/autofs.fifo-misc


The role of the extension under Linux:

    1. . Tar. tar.gz. tgz. tar.bz represents a compressed file, and the Create command is generally tar gzip unzip

    2. . sh represents a script file

    3. . PL represents a program developed by Perl language files in the Perl language

    4. . py represents Python language files, programs developed through the Python language

    5. . html. htm. php. jsp. Do represents a Web language file

    6. . conf represents a configuration file for system services

    7. . RPM indicates RPM installation package file

      Operations Development language: Shell Python perl php four One


This article is from the Linux Operations sharing blog, so be sure to keep this source http://liangey.blog.51cto.com/9097868/1574429

Linux file extension and type

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.