Compile your own ls commands on Ubuntu

Source: Internet
Author: User
Tags printable characters
The ls command is one of the most common commands in Linux. It has many options, many of which are very useful. Are you familiar with it? To learn how to write the ls command, first we need to know how to use it. In Linux Common commands and vi, the use of gdb section I has mentioned the use of ls commands (see the http://www.linuxidc.com/Linux/2012-07/64780.htm), we will first give a detailed introduction to the ls command

The ls command is one of the most common commands in Linux. It has many options, many of which are very useful. Are you familiar with it? To learn how to write the ls command, first we need to know how to use it.

In Linux Common commands and vi, the use of gdb section I has mentioned the use of ls commands (see the http://www.linuxidc.com/Linux/2012-07/64780.htm), we will first give a detailed introduction to the ls command

1. ls command details


The vast majority of options of the ls command are listed below.
-A lists all files in the directory, including hidden files starting.
-B lists non-output characters in the file name in the form of a backslash and a character number (just like in C.
-C: the time when the I node of the output file is modified and sorted accordingly.
-D: display the directory like a file instead of the file under it.
-E outputs all the information of the time, rather than the brief information.
-F-U does not sort the output files.
-G is useless.
-I: index information of the I node of the output file.
-K indicates the file size in the form of k bytes.
-L list the details of a file.
-M horizontal output file name, with "," as a grid character.
-N is replaced by the UID and GID of the number.
-O displays the details of the file except the group information.
-P-F attaches a character to each file name to indicate the type of the file. "*" indicates the executable normal
File; "/" indicates a directory; "@" indicates a symbolic link; "|" indicates operating OS; "=" indicates a set
Ets ).
-Q used? Replace non-printable characters.
-R sorts directories in reverse order.
-S outputs the file size after each file name.
-T is sorted by time.
-U is sorted by the time when the file was last accessed.
-X is output by column and sorted horizontally.
-A displays all files except "." and.
-B does not output "~" End of the backup file.
-C is output by column and vertically ordered.
-G indicates the group information of the output file.
-L list the link file names instead of the linked files.
-N does not limit the file length.
-Q: Enclose the output file name in double quotation marks.
-R: list all files in subdirectories.
-S is sorted by file size.
-X is sorted by the file extension (the character after the last.
-One Line outputs only one file.
-- Color = no: Do not display color file names
-- Help displays help information on the standard output.
-- Version outputs the version information on the standard output and exits.

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.