File types in Linux

Source: Internet
Author: User

1. Use the ls-l command to view the file type and permissions

[email protected] etc]$ LS-L----------.1Root root899October -  -: +Gshadow----------.1Root root890October -  -: AGshadow--rw-r--r--.1Root root801April1  .GSSAPI_MECH.CONFDRWXR-xr-x.3Root root4096October A  Geneva: -gtk-2.0drwxr-xr-x.3Root root4096October A  Geneva: -Hal-rw-r--r--.1Root root871October A  Geneva: onhba.conf-rw-r--r--.1Root root9October2  -host.conf-rw-r--r--.1Root root158January A  .hosts-rw-r--r--.1Root root370January A  .Hosts.allow-rw-r--r--.1Root root460January A  .HOSTS.DENYDRWXR-xr-x.2Root root4096October A  Geneva: -HPDRWXR-xr-x.2Root root4096October A  Geneva: GenevaHTDIGDRWXR-xr-x.5Root root4096October A  Geneva: -httpd-rw-r--r--.1Root root1066September -  -ibm_hosts-rw-r--r--.1Root root3581November1  -IDMAPD.CONFDRWXR-xr-x.2Root root4096October A  Geneva: -initlrwxrwxrwx. 1Root root OneOctober A  on: -INIT.D-rc.d/INIT.D-rw-r--r--.1Root root884October A  Geneva: +Inittab-rw-r--r--.1Root root942January A  .INPUTRCDRWXR-xr-x.3Root root4096October A  Geneva: +Ipa

The 2.windows file types are hidden files, read-only files, system files, and more, corresponding to the types of Linux files:

D directory file.

L Symbolic Link (pointing to another file, similar to a shortcut under plague).

s socket file.

B-Block device file, binary file.

C-character device file.

P Name the pipe file.

-Ordinary files, or more accurately, do not belong to several types of files.

3. Description of the file type:

B:block (block device files), in the past, after adding new disks, it is often necessary to manually increase the block device files. Now usually we do not need to manually add the block device files, run the service kudzu start, the system will automatically configure the appropriate device for you. The main feature of block device is that it can read and write randomly, and the most common block device is disk, such as/DEV/HDA1,/dev/sda2,/dev/fd0 and so on.

C:char (character device files), like a block device, we can generally use the service kudzu Start command to automatically add, remove, or modify character devices. The most common character devices are printers and terminals, and they can accept character streams. /dev/null is a very useful character device file, and everything that is fed into this device is ignored. If you redirect the output of any program to/dev/null, you do not see any output information. Even, you can point a user's shell to/dev/null to prevent it from landing.

P:pipe (Pipeline equipment files), piping equipment files are sometimes called FIFO files (FIFO is the first-in-one-out meaning), literally understand that piping equipment files are flowing from one end to the other. Usually we will do some work in order to achieve our "eat grass, squeeze out is milk" purpose.

L:link (Symbolic link file), similar to the so-called shortcut for Windows, but not exactly the same. Links are available in two ways, soft links and hard links. A soft link is also called a symbolic link, which contains the path name of another file. can be any file or directory that can link files from different file systems. Linked files can even link non-existent files, which results in what is commonly referred to as a "broken chain" (or "phenomenon"), and linked files can even be linked to themselves. The hard-link file has two restrictions 1, does not allow the creation of hard links to the directory; 2. Links can only be created between files in the same file system.

File types in Linux

Related Article

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.