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:
. Tar. tar.gz. tgz. tar.bz represents a compressed file, and the Create command is generally tar gzip unzip
. sh represents a script file
. PL represents a program developed by Perl language files in the Perl language
. py represents Python language files, programs developed through the Python language
. html. htm. php. jsp. Do represents a Web language file
. conf represents a configuration file for system services
. 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