Linux common commands (LS)

Source: Internet
Author: User

Recently the company's CactiEZ server often down, in order to find the cause and solve the problem, began to learn linux,0 Foundation Oh, a little bit every day, some of the content has its own understanding, if you see the wrong place please criticize.

1,ls

1.1, ls

View files under current directory and other paths 650) this.width=650; "src="%5c "title=" \ "qq20161117163428.png\"/"alt=" Wkiom1gtbkycldgoaaamjxcdmnw596.png-wh_50 "/>

1.2, ls-a

This command allows you to view all files in the current directory, excluding hidden files, hidden files are implemented through LS-A. When you can see all the files in the current root directory, including hidden files, hidden files are "." The first, for example, a. autorelabel file is a hidden file.

650) this.width=650; "src="%5c "title=" \ "2.png\"/"alt=" Wkiol1gtbrlgv2rfaaawvjat734921.png-wh_50 "/>

1.3, ls-l

If you want to see the details of the file, you can check here by Ls-l.

650) this.width=650; "src="%5c "title=" \ "3.png\"/"alt=" Wkiol1gtcymabzmtaabnhc_hdsy395.png-wh_50 "/>

Explain the meaning of the specific information shown here. Total 24 represents the size of the folder, there is no display units if you want to display units can be displayed by LS-LH unit is kbyte. One of the 10-bit horizontal lines in the first column represents the type of file:

1.3.1, 1th Place:

650) this.width=650; "src="%5c "title=" \ "3.png\"/"alt=" Wkiol1gteskim_8baabvfb_1dzk448.png-wh_50 "/>

-: Represents a normal file.

d (Directory): Represents a catalog file, which is represented in blue by the directory file in Linux.

L (link): Represents a linked file.

B (block): Block device files, in the Linux device type includes block device files and character (linear) device files, such as hard disk is a block device files, because the file is stored in the hard disk is divided into a block to save, access to read the sequence of the file in no order, So it's random access. While character (linear) devices are accessed linearly, such as input to the mouse keyboard and output devices such as monitors, are performed in a linear order by some queuing mechanisms, so the character device is also called a linear device.

C: Character device file.

P: Pipeline file.

S: Socket file.

The next 9 bits represent the permissions of the file, each 3 bits of a group, the permissions include R, W, x (read, write, execute), read 4, write 2, and executable is 1.

1.3.2, number of hard links to files

650) this.width=650; "src="%5c "title=" \ "6.png\"/"alt=" Wkiol1gte6yd6ggaaabwj_5xkrm033.png-wh_50 "/>

1.3.3, owner of file (master)

650) this.width=650; "src="%5c "title=" \ "7.png\"/"alt=" Wkiol1gte-bxc5mhaabvu7os_nk530.png-wh_50 "/>

1.3.4, size of file

650) this.width=650; "src="%5c "title=" \ "8.png\"/"alt=" Wkiom1gtfigs0fbxaabvvziytng171.png-wh_50 "/>

1.3.5, last modified time for file

650) this.width=650; "src="%5c "title=" \ "9.png\"/"alt=" Wkiol1gtfjohbnataabvnkok1f4371.png-wh_50 "/>

Here is a concept is the timestamp of the file (access, modification, change), the modification is the contents of the file is modified, the change is the properties of the file is changed.

1.4, ls of other commands

Ls-a: All files are displayed but not displayed. and.

650) this.width=650; "src="%5c "title=" \ "11.png\"/"alt=" Wkiom1gtfbjytjb2aaa6tdtkao4814.png-wh_50 "/>

Ls-ld: Displays the properties of the current directory itself.

Ls-i: Displays the index node number of subdirectories and files under the current directory.

Ls-r: File names are sorted in reverse order.

650) this.width=650; "src="%5c "title=" \ "13.png\" "alt=" Wkiol1gtf9yh4p83aaatnnibs4s232.png-wh_50 "/>

Ls-r: Recursive display

Linux common commands (LS)

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.