Linux command description--LS

Source: Internet
Author: User

--list Directory Contents

List information about the FILEs (the current directory by default). Sort entries Alphabetically if none Of-cftuvsux nor--sort. Mandatory arguments to long options is Mandatory for short options too.

Function: Used to display a list of directories.

Syntax: LS (option) (parameter)

Options:

-A: Displays all files and directories (ls default file or directory name is "./..." As hidden)

-A: show except hidden files "./..." List of all files except

-B: Output non-output characters in a file in a backslash-and-character-coded manner

-C: When in use with the "-lt" option, the output directory content is sorted according to the file status time, sorted by the CTime field in the index node of the file. When in conjunction with "-L", the order is based on the state change time of the file.

-C: Multi-column display output (only file name information)

-D: Displays only the directory name, not the list of contents under the directory, and displays the symbolic link file itself instead of the list of directories it specifies.

-F: The type identifier of the best file after each output entry, * Normal file for executable permissions,/for directory, @ for symbolic link, | For command pipeline, = for sockets socket, normal file not output identifier.

-H: Displayed in human readable format with KB,MB file size

-I: Displays the file index node number (inode), an index node representing a file

-L: Displays the list of contents in long format, output information: file name, file type, permission mode, number of hard links, owner, group, file size, file last modified time.

-L: If you encounter a file or directory with a symbolic link, the original file or directory created by the link is directly listed.

-M: Separate the name of each file and directory with a comma

-N: Replace its name with a user ID code and a group identifier Uid/gid

-R: Reverse order and output directory contents list by file name

-R: Recursive processing, all files and subdirectories under the established directory are processed together

-S: Displays the size of files and directories in chunks

-T: Sorting with file and directory change times

Parameters:
Table of Contents: Create a file to display the list, or it can be a specific directory
Example:
ls-lx/-L--sort=extension ": Name extension sort
LS-LHS ", sort files from large to small

Ls-l--si:si is in 1000 units, and-H is in 1024 units.

Ls-l--block-size=m: Setting file display units



Linux command description--LS

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.