The Linux ls command

Source: Internet
Author: User

LS: command to display the target list

1. Ls-a: Show All Files and directories (LS default to the file or directory with ".") Start as hidden, not listed)

2. Ls-l: Displays the content details in the directory. Include filename, file type, permission mode, number of hard connections, owner, group, file size, last modified time of file, etc.

3.LS-T: Sorting with file and directory change times

4.ls-d: Displays only the directory name, not the list of contents under the directory

5.ls-i: Displays the file index node number (inode). An index node represents a file

6.ls-h: Displays the file or directory size in the appropriate units (typically used with-LH)

The other parameters are as follows:

-A: Displays all files and directories (ls default file name or directory name is ".") As a shadow, not listed);

-A: Displays the Save Shadow file "." and ".." List of all files except;

-C: Multi-column display output results. This is the default option;

-F: Append the type identifier of the file after each output item, meaning: "*" means a normal file with executable permissions, "/" for the Directory, "@" for the symbolic Link, "|" Represents a command pipeline FIFO, and "=" represents a sockets socket. When the file is a normal file, do not output any identifiers;

-B: Outputs the non-output characters in the file with the backslash "" and the character encoding;

-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 the "-l" option, the ordered sentence is the time of the file's state change;

-D: Displays only the directory name, not the list of contents under the directory. Displays the symbolic link file itself without displaying the list of directories it points to;

-F: The effect of this parameter is the same as specifying the "AU" parameter, and the effect of the "LST" parameter is turned off;

-I: Displays the file index node number (inode). An index node represents a file;--file-type: The function is the same as the "-f" option, but does not display "*";

-K: Displays the file size in kilobytes (Kbytes);

-L: Displays a table of contents in a long format. The output information includes file name, file type, permission mode, number of hard connections, owner, group, file size, and last modification time of file, etc. from left to right.

-M: The name of each file and directory separated by the "," area;

-N: Replace its name with user identification code and group identifier;

-R: The list of directory contents is sorted and output in reverse order of file name;

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

-T: Sorts the file and directory change times;

-L: If you encounter a file or directory with a symbolic link, directly list the original file or directory that the link points to;

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

--full-time: Lists the full date and time;

--color[=when]: Use different colors to highlight different types of

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.