ref:Linux / Unix Command: ls

NAME

ls - list directory contents

SYNOPSIS

ls [OPTION]... [FILE]...

DESCRIPTION

List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuSUX nor --sort.

Mandatory arguments to long options are mandatory for short options too.

-a--all
do not hide entries starting with .
-A--almost-all
do not list implied . and ..
--author
print the author of each file
-b--escape
print octal escapes for nongraphic characters
--block-size=SIZE
use SIZE-byte blocks
-B--ignore-backups
do not list implied entries ending with ~
-c
with -lt: sort by, and show, ctime (time of 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]
control whether color is used to distinguish file types. WHEN may be `never', `always', or `auto'
-d--directory
list directory entries instead of contents
-D--dired
generate output designed for Emacs' dired mode
-f
do not sort, enable -aU, disable -lst
-F--classify
append indicator (one of */=@|) to entries
--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 do not list owner
-G--no-group
inhibit display of group information
-h--human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
--si
likewise, but use powers of 1000 not 1024
-H--dereference-command-line
follow symbolic links on the command line
--indicator-style=WORD append indicator with style WORD to entry names:
none (default), classify (-F), file-type (-p)
-i--inode
print 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 UIDs and GIDs
-N--literal
print raw entry names (don't treat e.g. control characters specially)
-o
like -l, but do not list group information
-p--file-type
append indicator (one of /=@|) to entries
-q--hide-control-chars
print ? instead of non graphic characters
--show-control-chars
show non graphic characters as-is (default unless program is `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 size of each file, in blocks
-S
sort by file size
--sort=WORD
extension -X, none -U, size -S, time -t, version -v
status -c, time -t, atime -u, access -u, use -u
--time=WORD
show time as WORD instead of modification time: atime, access, use, ctime or status; use specified time as sort key if --sort=time
--time-style=STYLE
show times using style STYLE: full-iso, long-iso, iso, locale, +FORMAT
FORMAT is interpreted like `date'; if FORMAT is FORMAT1FORMAT2, 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
sort by version
-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
--help
display this help and exit
--version
output version information and exit

SIZE may be (or may be an integer optionally followed by) one of following: kB 1000, K 1024, MB 1,000,000, M 1,048,576, and so on for G, T, P, E, Z, Y.

By default, color is not used to distinguish types of files. That is equivalent to using --color=none. Using the --color option without the optional WHEN argument is equivalent to using --color=always. With --color=auto, color codes are output only if standard output is connected to a terminal (tty).

SEE ALSO

The full documentation for ls is maintained as a Texinfo manual. If the info and ls programs are properly installed at your site, the command

info ls

should give you access to the complete manual.


Important: Use the man command (% man) to see how a command is used on your particular computer.

linux File Handling commands 'ls'.的更多相关文章

  1. Linux— file命令 用于辨识文件类型

    Linux file命令用于辨识文件类型. 通过file指令,我们得以辨识该文件的类型. 语法 file [-bcLvz][-f <名称文件>][-m <魔法数字文件>...] ...

  2. Linux命令系列之ls——原来最简单的ls这么复杂

    Linux命令系列之ls--原来最简单的ls这么复杂 ls命令应该是我们最常用的命令之一了,但是我们可能容易忽略那些看起来最简单的东西. 简介 ls命令的使用格式如下 ls [选项] [具体的文件] ...

  3. 20145239 Linux下常用的ls命令总结

    20145239 Linux下常用的ls命令总结 通过学习本周的教学视频和要求掌握的内容,发现ls命令被使用的次数非常多,但作为一个初学者,可能我只会ls或者顶多ls -l两种用法.但其实ls是一个非 ...

  4. File handling in Delphi Object Pascal(处理record类型)

    With new users purchasing Delphi every single day, it’s not uncommon for me to meet users that are n ...

  5. chattr lsattr linux file system attributes - linux 文件系统扩展属性

    我们使用 linux 文件系统扩展属性,能够对linux文件系统进行进一步保护:从而给文件 赋予一些额外的限制:在有些情况下,能够对我们的系统提供保护: chattr命令用来改变文件属性.这项指令可改 ...

  6. 《学渣Linux笔记》——更改ls命令的输出颜色和命令提示符颜色(二)

    <学渣Linux笔记>--更改ls命令的输出颜色和命令提示符颜色(二) II.更改命令提示符颜色 命令提示符的显示格式是由变量PS1决定的,首先我们查找GNU官方手册,发现如下内容(不是我 ...

  7. 【原】 The Linux Command Line- pwd,cd,ls,file,less

    pwd - print name of current working directory. cd - change directory ls - list directory contents fi ...

  8. 磁盘、分区及Linux文件系统 [Disk, Partition, Linux File System]

    1.磁盘基础知识 1.1 物理结构 硬盘的物理结构一般由磁头与碟片.电动机.主控芯片与排线等部件组成:当主电动机带动碟片旋转时,副电动机带动一组(磁头)到相对应的碟片上并确定读取正面还是反面的碟面,磁 ...

  9. Linux File Recovery Study

    Background Today I did stupid things that I went into the ~/Downloads/ and pressed [Alt] + [A] then ...

随机推荐

  1. Struts2之ajax初析

    Web2.0的随波逐流,Ajax那是大放异彩,Struts2框架自己整合了对Ajax的原生支持(struts 2.1.7+,之前的版本可以通过插件实现),框架的整合只是使得JSON的创建变得异常简单, ...

  2. visualvm监控jvm及远程jvm监控方法(转)

    VisualVM是Sun的一个OpenJDK项目,其目的在于为Java应用创建一个整套的问题解决工具.它集成了多个JDK命令工具的一个可视化工具,它主要用来监控JVM的运行情况,可以用它来查看和浏览H ...

  3. Unity Time的使用

    脚本语言:C# 1.deltatime: deltatime它表示距上一次调用Update或FixedUpdate所用的时间,调用deltatime可以使物体的旋转以一种恒定的速度来运行,而不受帧速率 ...

  4. poj1980

    首先想到费用流,但m<=100000还是算了吧那就感觉要用dp了,首先将a,b排序贪心一下可知,a,b的配对肯定不可能出现交叉这样就可以dp了,复杂度O(nm)还是过不去在贪心一下会发现,对于a ...

  5. Apache CXF多个远程拒绝服务漏洞(CVE-2013-2160)

    漏洞版本: Apache Group CXF <= 2.5.10 Apache Group CXF 2.7.4 Apache Group CXF 2.6.7 漏洞描述: BUGTRAQ ID: ...

  6. Linux Kernel 'dispatch_discard_io()'安全绕过漏洞

    漏洞版本: Linux Kernel 漏洞描述: Bugtraq ID:60414 CVE ID:CVE-2013-2140 Linux是一款开源的操作系统. 由于不充分的检查BLKIF_OP_DIS ...

  7. Ubuntu 14.04 Remmina远程桌面连接Windows计算机

    可以在/usr/share/applications/目录下启动Remmina远程桌面客户端或者直接在Dash中搜索Remmina即可 启动后如下图,可以新建,复制,编辑,删除远程桌面客户端 选择新建 ...

  8. 第一个ios程序

    1.ios的理解: Operating System,简称OS,操作系统,ios是苹果操作系统. 2.Xcode开发环境: 苹果公司开发的编程软件,是开发人员建立OS X 和 iOS 应用程序的最快捷 ...

  9. Access denied for user 'root'@'localhost' (using password:YES) 解决方案

    1.打开MySQL目录下的my.ini文件,在文件的最后添加一行“skip-grant-tables”,保存并关闭文件. 2.重启MySQL服务. 3.在命令行中输入“mysql -uroot -p” ...

  10. 终止imp/exp和expdp/impdp进程运行的方法

    一.停止EXP/IMP优化速度 可以直接KILL 进程,但先要KILL 父进程,然后KILL子进程,只KILL子进程,EXP/IMP还会在后台执行的 样例:ps -ef |grep imp 查询到pi ...