Linux Command----directory contents

Source: Internet
Author: User

Show Directory Contents:

ls [option] ... [File] ...

LS is a shorthand for English words, its function is to display the contents of the directory;

By default, the output entries are sorted alphabetically;

When a directory name or file name is not given, the current directory information is displayed.

[option]:

-a lists hidden files in the file with "." Start with hidden files, such as: ~/.BASHRC

-l list File details

-R is listed along with the contents of subdirectories

The information displayed with the LS-L command begins with a 10-character string, where the first character represents the type of file and has the following types:

-Normal file

Catalog D

L Symbolic Link

B-Block device files

C-Character device files

s socket file (network sockets)

P Pipe

The following 9 characters represent the access rights of the file, divided into 3 groups and 3 bits per group. The first group represents the permissions that the file belongs to, the second group represents the permissions of other users in the same group, and the third group represents the permissions of the users of the other groups. Each group of three characters represents the read, write, and execute permissions on the file, respectively. The permissions are as follows:

R Read

W Write

x executable (for directory, access permission)

When the file is executed, the user ID or group ID of the file is assigned to the user ID of the executing process

T set flag bit

-No corresponding permissions

Linux Command----directory contents

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.