您的位置:首页 > 其它

ls 命令用法

2013-12-30 17:19 253 查看
NAME

ls -- list directory contents

SYNOPSIS

ls [-ABCFGHLOPRSTUW@abcdefghiklmnopqrstuwx1] [file ...]

DESCRIPTION

For each operand that names a file of a type other than directory,

ls displays its name as well as any requested, associated information.

For each operand that names a file of type directory,

ls displays the names of files contained within that directory,

as well as any requested, associated information.

EXAMPLE

1. 显示当前目录下面的所有文件,包括隐藏文件

$ ls -a

2. 按照文件/目录的类型,用不同的颜色和符号加以区分

$ la -FG

3. 显示当前目录下面的文件,包括详细信息

$ la -l

4. 显示当前目录下面的文件,按照创建时间的顺序来显示(即最新创建的最后显示)

$ la -ltr

5. 这是一些常用的alias

alias la='ls -a'

alias lf='ls -FG'

alias ll='ls -lh'

alias lll='ls -lh | less'

alias ltr='ls -ltrh'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: