Linuxll command parameters

Source: Internet
Author: User
Tags sorted by name
If the-cftuvSUX or -- sort option is not specified, it is sorted by letter size. Usage: ls [option]... [file]...
List FILE information (the current directory by default ).
If the-cftuvSUX or -- sort option is not specified, it is sorted by letter size.


Parameters required for long options are also required for short options.
-A, -- all does not hide any project that starts.
-A, -- almost-all: list any projects...
-- Author and-l list the authors of each file at the same time
-B, -- escape represents unprintable characters in an octal overflow sequence
-- Block-size = size block, in bytes of the specified size
-B, -- ignore-backups does not list any "~ "End Project
-C with-lt: Sort by ctime and display ctime (file
Time when the status was last changed)
Combined with-l: The ctime is displayed, but sorted by name. other cases: sorted by ctime
-C. list projects from top to bottom in each column
-- Color [= WHEN] controls whether to use color to distinguish files. WHEN can be
"Never" (default), "always", or "auto"
-D, -- directory: list the files in the directory rather than in the directory when a directory is encountered.
-D, -- dired generates results suitable for the dired mode of Emacs
-F is not sorted, The-aU option takes effect, and The-lst option is invalid.
-F, -- classify plus the file type indicator (*/= @ | one of them)
-- Format = staggered-x keywords, separated by commas (,)-m, horizontal-x, long-l,
Watermark-1, detailed-l, vertical-C
-- Full-time:-l -- time-style = full-iso
-G is similar to-l, but the owner is not listed.
-- Group-directories-first
Group directories before files. This option can be used with -- sort,
However, once -- sort = none (-U) is used, the group is disabled.
-G, -- no-group is in the form of a long list, and no group name is output
-H, -- human-readable and-l together, output the file size in an easy-to-read format
(For example, 1 K 234 M 2G)
-- Si is similar to the above, but 1000 is used as the base instead of 1024.
-H, -- dereference-command-line
Symbolic links listed by the command line
-- Dereference-command-line-symlink-to-dir
Symbolic links to directories listed by the command line
-- Hide = PATTERN: hide a project that meets the PATTERN.
(-A or-A will overwrite this option)
-- Indicator-style = specifies the method of adding an indicator after each project name:
None (default), classify (-F), file-type (-p)
-I, -- inode: displays the inode number of each file
-I, -- ignore = PATTERN does not display any project that meets the specified shell PATTERN
-K is -- block-size = 1 K
-L use a long format to list information
-L, -- dereference: when the file information of the symbolic link is displayed, the symbolic link indicates
Object instead of the information of the symbolic link.
-M all items are separated by commas (,) and the whole row width is filled.
-N, -- numeric-uid-gid is similar to-l, but UID and GID are listed.
-N, -- literal outputs unprocessed project names (for example, do not specially process control characters)
-O is similar to-l, but does not list information about the group.
-P, -- indicator-style = slash: add the symbol "/" to the directory "/"
-Q, -- hide-control-chars "? "Replace the characters that cannot be printed
-- Show-control-chars: displays unprintable characters directly (this is the default mode unless you call
The program name is "ls" and the result is output on the terminal)
-Q, -- quote-name enclose the entry name in double quotation marks
-- Quoting-style =: Use the specified quoting method to display the name of the entry:
Literal, locale, shell, shell-always, c, escape
-R, -- reverse order reserved
-R, -- recursive display subdirectory
-S, -- size displays the size allocated to each file in the form of blocks
-S sort by file size
-- Sort = Below is an optional WORD and the corresponding options they represent:
Extension-X status-c
None-U time-t
Size-S atime-u
Time-t access-u
Version-v use-u
-- Time = when both WORD and-l are used, the time represented by WORD is displayed instead of the time when it is modified.
: Atime, access, use, ctime, or status; and
-- Sort = time takes the specified time as the sorting keyword.
-- Time-style = when using STYLE and-l simultaneously, the time is displayed according to the format represented by STYLE:
Full-iso, iso, locale, posix-iso, and + FORMAT.
FORMAT is the time FORMAT used by "date". if FORMAT
Is FORMAT1 <换行> FORMAT2, FORMAT1 applies to older versions
While FORMAT2 applies to newer files; if the STYLE
If it starts with "posix-", the STYLE is only outside the POSIX language.
Effective.
-T sort by modification time
-T, -- tabsize = width specifies the width of the Tab, not 8 characters
-T sort by modification time
-T, -- tabsize = COLS specifies the width of the Tab, not 8 characters
-U used with-lt: sorted by access time and displayed
Use with-l: Display access time and sort by file name
Others: Sort by access time
-U is not sorted. projects are listed in the directory order.
-V sorts numbers (versions) in the text.
-W, -- width = COLS assume screen width instead of current value
-X list entries by lines instead of by columns
-X sort alphabetically by entry extension
-1 list one file per line


SELinux options:


-- Lcontext Display security context. Enable-l. Lines
Will probably be too wide for most displays.
-Z, -- context Display security context so it fits on most
Displays. Displays only mode, user, group,
Security context and file name.
-- Scontext Display only security context and file name.
-- Help: displays the help information and exits.
-- Version: displays the version information and exits.


SIZE can be an optional integer followed by one of the following units:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, G, T, P, E, Z, Y.


The feature that uses color to differentiate file types has been disabled. it is disabled by default with -- color = never.
With the -- color = auto option, ls generates the color code only when the standard output is connected to the terminal.
You can use the dircolors command to set the LS_COLORS environment variable.




Exit status:
0 normal
1. general problem (for example, the sub-folder cannot be accessed)
2. serious problems (for example, command line parameters cannot be used)
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.