Parse special CentOS files

Source: Internet
Author: User
With your experience in Dos and Windows, you probably know that there are several types of files in the system, such as system files, read-only files, and hidden files. Use ls in Linux? L command to determine the file type, which can be determined based on the 10 characters in the first column. -Rw-r-r-indicates that 1.txt and myprog04 files are common files. All files starting with "-" are common files, while those starting with "d" are Directory files. Brw-rw ---- specifies/dev/sd

With your experience in Dos and Windows, you probably know that there are several types of files in the system, such as system files, read-only files, and hidden files. Use ls in Linux? L command to determine the file type, which can be determined based on the 10 characters in the first column.
-Rw-r-indicates that 1.txt and myprog04 files are common files. All files starting with "-" are common files, while those starting with "d" are Directory files.
Brw-rw ---- indicates that/dev/sda1 is a Block Device file. All files starting with "B" are block device files.
Crw-rw ---- indicates that/dev/lp0 is a character Device file. files starting with "c" are character Device files.
Srwxrwxrwx indicates that/var/lib/mysql. sock is a socket file. All files starting with "" are socket files.
Prwxr-r -- specifies that mypipe is a pipeline file. An attribute of the MPs queue file is "p ".
Lrwxrwxrwx indicates that softlinkof1.txt is a soft link file (or a symbolic link file) that refers to 1.txt. Files starting with "l" are soft-link files.
-The hard_link_of_1.txt file starting with rw-r-r-r-seems to be a common file, but it is actually a hard link file.
-Rwsr-xr-x indicates that myprog01 is an executable file with a setUid, which is determined by the fourth character "s.
-Rwxr-sr-x indicates that myprog03 is an executable file with a setGid, which is determined by "s" in the seventh character.
-Rwsr-sr-x indicates that myprog02 is an executable file with setUid and setGid. this is determined by "s" in the fourth and seventh characters.
The first "d" in drwxrwxrwt indicates that the tmp file is a directory, and the last character "t" indicates that the directory is set with a sticking bit.


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.