Common Linux commands: ls

Source: Internet
Author: User

Name: ls

Permission: All Users

Usage: ls [-alrtafr] [name...]

Description: displays the contents of a specified working directory (list files and subdirectories contained in the current working directory ).

Parameters:

-A: displays all files and directories. (If the file name or directory name starts with "." is specified in LS, it is regarded as a hidden file and will not be listed)
-L in addition to the file name, the file type, permission, owner, and file size are also listed in detail.
-R: Display files in reverse order (originally in alphabetical order)
-T list archives in the order of creation time
-A is the same as-a, but does not list "." (current directory) and ".." (parent directory)
-F Add a symbol after the name of the file to be listed. For example, add "*" to the executable file and add "/" to the directory "/"
-R if the directory contains files, the following files are listed in sequence.

Example:
List all files whose names start with "S" in the current working directory:
Ls-ltr s *

List all the following directories and file details in the/bin directory:
Ls-LR/bin

List all files and directories under the current working directory. Add "/" after the directory name, and add "*" after the executable file name "*":
Ls-AF

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.