Linux Command ls

Source: Internet
Author: User

Linux Command ls

What?

List contents of a directory

How?

Ls [-ABCFGHLOPRSTUW @ abcdefghiklmnopqrstuwx1] [file...]

Points -- Common Parameters

Ls-l displays detailed information about the directory file [linux File Attributes]

Ls-t sort by modification time in reverse order

Ls-r reverse in reverse order

Ls-F identifies the type of the file/indicates the directory * indicates the executable file @ indicates soft connection = indicates the socket file | indicates that these identifiers of the MPs queue file follow the file name

Example

Displays the file details in the directory in reverse order of the modification time (the latest modification is at the bottom)

Using test ls-lrtF
Total 8
Drwxr-xr-x 2 a2014 staff 68 1 20 18:07 movies/
Drwxr-xr-x 2 a2014 staff 68 1 20 18:07 music/
Drwxr-xr-x 2 a2014 staff 68 1 20 18:07 download/
Drwxr-xr-x 2 a2014 staff 68 1 20 18:08 documents/
Drwxr-xr-x 2 a2014 staff 68 1 20 18:08 pictures/
-Rw-r -- 1 a2014 staff 2 1 20 18:27 test.txt
-Rw-r -- 1 a2014 staff 0 1 20 18:28 test1.txt

Total -- size of files and directories in this directory, in KB

For other details, see the detailed attributes of the Linux File below.

Total 0
Drwxr-xr-x 2 a2014 staff 68 1 20 documents
Drwxr-xr-x 2 a2014 staff 68 1 20 18:07 download
Drwxr-xr-x 2 a2014 staff 68 1 20 18:07 movies
Drwxr-xr-x 2 a2014 staff 68 1 20 18:07 music
Drwxr-xr-x 2 a2014 staff 68 1 20 18:08 pictures
-Rw-r -- 1 a2014 staff 0 1 20 18:08 test.txt

Total -- size of files and directories in this directory, in KB

The first field has a total of 10 characters. The first character represents the type of the file, and d represents the path, and-represents the normal file. The remaining 9 characters are represented in three groups.

Implementation of ls commands in Linux

This article permanently updates the link address:

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.