The format and parameters of LS for common Linux commands

Source: Internet
Author: User
Tags printable characters

ls command is the abbreviation of the list, the lack of saving LS used to print out the current directory of the list, if LS specifies a different directory, then the specified directory of files and folders will be displayed list. The LS command can not only view the files contained in the Linux folder, but also can view the file permissions (including directories, folders, file permissions), view directory information and so on, the LS command in the daily use of the Linux operation of a lot, let us first introduce the LS command format and parameters.ls command format: LS [option] [directory name].  LS command function: Lists all subdirectories and files in the target directory. The   ls command parameter option description: -a,–all lists all files under the directory, including the. The implied file at the beginning.  -a,–almost-all list except. And any item other than  –author print out the author of each file  -b,–escape the non-output characters in the file name are listed in the form of a backslash and character number.  –block-size= size block to specify < size > bytes  -b,–ignore-backups do not list any items ending with the ~ character  -C output File CTime (when the file status last changed ), and sort by CTime.  -c list items from top to bottom  –color[=when] controls whether color-resolved files are used. When can be ' never ', ' always ' or ' auto ' one of them  -d,–directory displays the directory like a file, rather than displaying the file under it.  -d,–dired results in dired mode suitable for Emacs  -F for output files are not sorted,-au option is active,-lst option is invalidated  -f,–classify plus indicator of file type (* /[email protected]|  One of them)  –format= keyword across-x,commas-m,horizontal-x,long-l,  single-column-1,verbose-l,vertical-c  –full-time is-l–time-style=full-iso -g similar to-l, but does not list owners  -g,–no-group does not list any information about the group  -h,–human-readable to The easy-to-understand format lists the file size (for example, 1K 234M 2G)  –si similar to-H, but the file size takes 1000 instead of 1024 -h,–dereference-command-line using the symbolic link in the command column to indicate Real Destination &NBsp The –indicator-style= method specifies that after each project name, with the indicator < method >:  None (default), classify (-f), File-type (-p)  -i,–inode prints the I of each file The node  -i,–ignore= style does not print any items that conform to the shell Universal Character < style > (k-K), which is the size of the file in the form of a –block-size=1k.  -L lists detailed information about the file.  -l,–dereference When displaying the file information for a symbolic link, the information indicated by the symbolic link is displayed instead of the symbolic link itself  -m all items are separated by commas and fill the entire row width  -n,–numeric-uid-gid class Like-L, use the number uid,gid instead of the name.  -n,–literal Prints the name of the unprocessed item (for example, does not specifically handle the control character)  -O is similar to-L, showing details of the file in addition to the group information.  -P,-F attaches a character after each file name to indicate the type of the file, "*" indicates an executable plain file; " /"indicates directory;" @ "denotes symbolic link;" | " Represents FIFOs; " = "indicates socket   (sockets).  -q,–hide-control-chars to? Character  –show-control-chars characters instead of printable characters (this is the default, unless the calling program name is ' ls ' and is output on the terminal screen)  -q,–quote-name Enclose the project name in double quotation marks  –quoting-style= using the specified quoting < method > display the name of the project: literal, Locale, Shell, Shell-always, C, escape   -r,–reverse in reverse order  -r,–recursive lists all subdirectory tiers  -s,–size the size of all files in block size  -s Sort by file size   –sort=word The following are optional WORD and the corresponding options they represent: &NBSp Extension-x status-c  none-u time-t  size-s atime-u  time-t access-u  version-v use-u&nb  Sp -T with file modification time sort  -u mate-lt: Show access time and sort by access time   mate-L: Show access time but sort by name   Otherwise: Sort by access time  -U does not sort, lists items according to the original order of the file system  -v Sort by version  -w,–width=cols self-Specifies screen width instead of current value  -X line-by-row listing of items instead of column-wise  -x Sort by extension  -1 only one file per line is listed &NBSP;–HELP Display this help message and leave  –version to display the version information and leave the  

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.