Seven kinds of file types under Linux

Normal file type (-)
. A file up to the Linux type, plain text files (the ASCII); binary (binary); file data format (Data); various compressed file a first attribute is [-] these files are typically created with a number of related applications, such as image tools, documentation tools, archiving tools ... .... or cp tools. Delete these files is the way with the rm command.


Catalog file (d)
is a directory, use # cd command entry. The first property is [D], for example [drwxrwxrwx], can be used to create a directory command mkdir command, or cp command, cp can copy a directory to another directory. Deleted with rm or rmdir command.


Block device (b) and character devices (c)

This kind of document, is to create a mknode, use rm to delete. Currently in the latest Linux release, we generally do not have to create a device file. Because these files are associated with the kernel.
File block device: the system is to store data for access interface device, simply, is hard. One example hard disk code is / dev / hda1 and other documents. The first property is a [b] 
character device 
character device files: the serial port interface device, such as a keyboard, a mouse, and the like. The first property is [c] 


Socket file (s)
such generally used in a network file the data connection. Can start a request to listen for client, the client may communicate data through the socket. The first property is [s], most often seen in this type of file / var / run directory 


Pipe file (the p-)
the FIFO is a special type of file, its main purpose is to address the multiple programs simultaneously access a file error caused. FIFO is an acronym for first-in-first-out (FIFO) is. The first property is [p] 

Symbolic links (l)
when we view file properties, you will see a similar lrwxrwxrwx, note that the first character is l, such documents are linked files. Is the name of the new file name by ln -s source file. The above is an example, it is represented setup.log install.log soft link file. How to understand it? This is the Windows operating system shortcuts somewhat similar.

Guess you like

Origin www.cnblogs.com/longqin/p/11619645.html