The Linux ls command

Source: Internet
Author: User
Tags control characters

The LS command is the most commonly used command under Linux. LS is the abbreviation of the list, the missing LS will list the list of files in the current directory, if you make a directory after LS, the list of files in the specified directory will be listed.

LS In addition to view the list of files in the Linux directory, you can also view file permissions, directory information, etc.

1. Syntax:ls [option] [directory name]

2. Function: List all subdirectories and files in target directory

3. Parameter Description:

< Span style= "font-size:16px;font-family: ' Song Body ', Simsun;color:rgb (255,51,204);" >-a =-all      #列出目录下的所有文件, including. Opening hidden files

< Span style= "font-size:16px;font-family: ' Song Body ', Simsun;color:rgb (255,51,204);" >-a       #列出除了. Files other than:

- L #以长格式显示文件的详细信息, such as creator, creation time, read permission for the file, etc.

- L #列出文件的链接名, Link

-h/--human-readable #用 "K", "M", "G" to show the size of files and directories

-H #与-h similar, but calculated in 1000Bytes instead of 1024Bytes

< Span style= "font-size:16px;font-family: ' Song Body ', Simsun;color:rgb (255,51,204);" >-i      #显示每个文件inode号

- R #反向排序

- R #将目录下的所有文件和子目录的文件列出来, recursive

< Span style= "font-size:16px;font-family: ' Song Body ', Simsun;color:rgb (255,51,204);" >-t       #以文件的修改时间排序

< Span style= "font-size:16px;font-family: ' Song Body ', Simsun;color:rgb (255,51,204);" >-d      #列出目录本身的信息, not content under directory.

< Span style= "font-size:16px;font-family: ' Song Body ', Simsun;color:rgb (255,51,204);" >-s      #在每个文件后面显示文件大小

- S #以文件的大小排序

- F #在每个文件的末尾加上一个字符说明文件的类型.

* Indicates the executable normal file/representation directory @ denotes symbolic connection | represents FIFOs = SOCKET

-P #与-f similar, but does not add the * number after executing the file

-M #用 ', ' separates the names of each file and directory

-n #直接列出文件和目录的名称, including control characters

-Q #用? Instead of control characters, displays the names of files and directories

-Q #把文件和目录名称用 "" to cause

-a #显示所有文件和目录, but does not display the current directory and upper directory

-C #以从上至下, left-to-right, display file and directory names in straight line mode

U #以最后存取时间排序, displaying files and directories

--u #列出文件和目录名称时不排序

-V #以版本进行排序

- W #设置每列最大字符数

- x #以从左到右, top to bottom display of file and directory names in Heng Lie mode

- x #以最后一个扩展名排序

--block-size=< block Size > #指定存放文件的区块大小

--full-time #列出完整日期与时间

--sort #查看排序方式

--time=< time stamp > #用指定的时间戳取代更改时间

--version #显示版本信息

--color #在字符模式中以颜色区分不同的文件, if you use "-color=tty", it means that you use the terminal predefined color scheme

Ls-1 vertical printing, one line only displays a


This article is from the "one Mu three sub-Fields" blog, please be sure to keep this source http://whitepoppy.blog.51cto.com/2061385/1617568

The Linux ls command

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.