Linux Command Learning Summary _ls

Source: Internet
Author: User
Tags locale posix

Command: LS

This command is used to list information about a file.

Usage:

Usage:ls [OPTION] ... [FILE] ...


Options:

-A,--all do not ignore entries starting with.

-A,--almost-all do not list implied. and..

--author with-l, print the author of each file

-B,--escape print octal escapes for nongraphic characters

--block-size=size use Size-byte blocks. See SIZE format below

-B,--ignore-backups do not list implied entries ending with ~

-C With-lt:sort by, and show, CTime (time of the last

Modification of file status information)

With-l: Show CTime and Sort by name

Otherwise:sort by CTime

-c List Entries by columns

--color[=when] colorize the output. When defaults to ' always '

Or can be ' never ' or ' auto '. More info below

-D,--directory list directory entries instead of contents,

And do not dereference symbolic links

-D,--dired generate output designed for Emacs ' dired mode

-F do not sort, enable-au, Disable-ls--color

-F,--classify append indicator (one of */=>@|) to entries

--file-type Likewise, except do not append ' * '

--format=word across-x, Commas-m, Horizontal-x, Long-l,

Single-column-1, Verbose-l, vertical-c

--full-time like-l--time-style=full-iso

-G like-l, but does not list owner

--group-directories-first

Group directories before files.

Augment with a--sort option, and any

Use of--sort=none (-u) disables grouping

-G,--no-group in a long listing, don ' t print Group names

-H,--human-readable with-l, print sizes in human readable format

(e.g., 1K 234M 2G)

--si Likewise, but use powers of 1024

-H,--dereference-command-line

Follow symbolic links listed on the command line

--dereference-command-line-symlink-to-dir

Follow command line symbolic link

That points to a directory

--hide=pattern do not list implied entries matching shell PATTERN

(Overridden By-a or-a)

--indicator-style=word Append indicator with style WORD to entry names:

None (default), slash (-P),

File-type (--file-type), classify (-f)

-I,--inode print the index number of each file

-I,--ignore=pattern do not list implied entries matching shell PATTERN

-K like--block-size=1k

-L Use a long listing format

-L,--dereference when showing file information for a symbolic

Link, show information for the file the link

References rather than for the link itself

-M fill width with a comma separated list of entries

-N,--numeric-uid-gid like-l, but list numeric user and group IDs

-N,--literal print raw entry names (don ' t treat e.g. control

Characters specially)

-O like-l, but does not list group information

-P,--indicator-style=slash

Append/indicator to Directories

-Q,--hide-control-chars print? Instead of non graphic characters

--show-control-chars show non graphic characters as-is (default

Unless program was ' ls ' and output is a terminal)

-Q,--quote-name enclose entry names in double quotes

--quoting-style=word use quoting style WORD for entry names:

Literal, locale, Shell, Shell-always, C, escape

-R,--reverse reverse order while sorting

-R,--recursive list subdirectories recursively

-S,--size print the allocated size of each file, in blocks

-s sort by file size

--sort=word Sort by WORD instead of Name:none-u,

Extension-x, Size-s, Time-t, version-v

--time=word with-l, Show time as WORD instead of modification

Time:atime-u, Access-u, Use-u, Ctime-c,

or status-c; Use specified time as sort key

If--sort=time

--time-style=style with-l, show times using style style:

Full-iso, Long-iso, ISO, locale, +format.

FORMAT is interpreted like ' date '; If FORMAT is

FORMAT1<NEWLINE>FORMAT2, FORMAT1 applies To

non-recent files and FORMAT2 to recent files;

If style is prefixed with ' posix-', STYLE

Takes effect only outside the POSIX locale

-t Sort by modification time

-T,--tabsize=cols assume tab stops at each COLS instead of 8

-U with-lt:sort by, and show, Access time

With-l: Show access time and sort by name

Otherwise:sort by Access time

-U do not sort; List entries in directory order

-V Natural sort of (version) numbers within text

-W,--width=cols assume screen width instead of the 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

Would probably is 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 Display this Help and exit

--version output version information and exit



This article is from the "Love Coffee" blog, please be sure to keep this source http://4837471.blog.51cto.com/4827471/1560686

Linux Command Learning Summary _ls

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.