(001) LS for linux command-line commands

Source: Internet
Author: User
Tags readable

Fundamentals of the ten-year OPS series-Linux

Zeng Lin

Contact: [Email protected]

Website: www.jplatformx.com

Copyright: Please do not reprint the article without permission

First, Introduction

Under normal circumstances, Linux commands themselves are not complex, after all, Linux lineage is the philosophy of Unix culture, so-called less are more. Linux commands are really hard to be the options and parameters in the command. Let's take a general look at how most of the commands under Linux work. Typically, commands are followed by one or more options, and commands with different options do not function the same. In addition, the command is followed by one or more parameters, which are the objects that the command acts on. So most of the commands look like this:

command-options Arguments

Most commands use the option to precede a single character with a hyphen, such as-L. However, many commands, including those in the GNU project, also support long options with two hyphens in front of the word, such as--help. Also, many commands allow multiple short option strings to be used together, such as LS-LT. -L is displayed in a long format, and the-t display is displayed in reverse chronological order.

Second, ls command

The LS command functions as a list directory contents. According to the above command itself is not difficult to understand, difficult is the options and parameters. The following is a list of common options for the LS command, and it is sufficient to remember these commonly used options in your work.

Options Long options Meaning
-A --all Lists all files, including files that begin with. Hidden files are not listed by default
-D --directory Typically, if you specify a directory, the LS command lists the contents of the directory rather than the directory itself. Use this option in conjunction with the-l option to view the details of the directory, not the contents of the directory
-F --classify The option adds a type indicator after each listed name (for example, if the name is a directory, a slash is added)
-H --human-readable Listed in long format, displaying the size of a file in a human-readable manner rather than as a number of bytes
-L Make long format display results
-R --reverse Displays the results in reverse order. Normally, the LS command displays results in ascending alphabetical order
-S Sort results by File size
-T Sort by modified time

(001) LS for linux command-line commands

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.