ls在系统中常用的选项与用法
2016-07-28 21:13
465 查看
ls在系统中常用的选项与用法
ls User Commands
(用户 命令)
ls - list directory contents
(列出目录的内容)
ls [OPTION]... [FILE]...
(选项) (文件)
~]# ls -a --all do not ignore entries starting with . (.是当前目录..是上级目录)
(打开当前目录下所有包含.开头的文件或者目录)
~]# ls -A --almost-all do not list implied . and ..
(打开的当前目录下不列出.和..的文件或者目录)
~]# ls -d list directories themselves, not their contents
(打开一个目录的列表显示目录本身,而不显示内容)
~]# ls -i --inode print the index number of each file
(打开当前目录下的文件或者目录的索引号)
~]# ls -l use a long listing format
(打开当前文件或者目录以长列表格式;显示额外的信息)
~]# ls -m fill width with a comma separated list of entries
(打开当前所在目录下以逗号分隔的条目列表)
~]# ls -r --reverse reverse order while sorting
(打开当前所在文件或者目录;生成时间或者创建时间最早的排第一个 的方式列出格式)
~]# ls -R --recursive list subdirectories recursively
(打开当前目录或者文件下;递归地列出子目录)
~]# ls -s --size print the allocated size of each file, in blocks
(显示每个文件或者目录所分配的块大小)
~]# ls -S sort by file size
(按照文件大小排序)
~]# ls -t sort by modification time
(按照修改时间排序)
~]# ls -u with -lt: sort by, and show, access time with -l:
show access time and sort by name otherwise:
sortby access time
(配合-t选项;例如~]# ls -ut 按照访问和修改时间重新排序格式)
~]# ls -U do not sort; list entries in directory order
(不排序,按照文件或者目录存放顺序显示)
~]# ls -v natural sort of (version) numbers within text
(按照文本中的版本号自然排序)
~]# ls -x list entries by lines instead of by columns
(按行而不是列表的进行排序)
~]# ls -X sort alphabetically by entry extension
(按字母顺序进行列表排序)
~]# ls -1 list one file per line
(列出每行一个文件的方式进行排序)
~]# ls -Z Display security context so it fits on most dis-
plays. Displays only mode, user, group, security
context and file name.
(上下显示用户、组、安全、文件或者目录信息)
新手上路,请照顾
作者:小马哥(xiaomag)
本文出自 “小马哥Linux系统运维” 博客,转载请与作者联系!
ls User Commands
(用户 命令)
ls - list directory contents
(列出目录的内容)
ls [OPTION]... [FILE]...
(选项) (文件)
~]# ls -a --all do not ignore entries starting with . (.是当前目录..是上级目录)
(打开当前目录下所有包含.开头的文件或者目录)
~]# ls -A --almost-all do not list implied . and ..
(打开的当前目录下不列出.和..的文件或者目录)
~]# ls -d list directories themselves, not their contents
(打开一个目录的列表显示目录本身,而不显示内容)
~]# ls -i --inode print the index number of each file
(打开当前目录下的文件或者目录的索引号)
~]# ls -l use a long listing format
(打开当前文件或者目录以长列表格式;显示额外的信息)
~]# ls -m fill width with a comma separated list of entries
(打开当前所在目录下以逗号分隔的条目列表)
~]# ls -r --reverse reverse order while sorting
(打开当前所在文件或者目录;生成时间或者创建时间最早的排第一个 的方式列出格式)
~]# ls -R --recursive list subdirectories recursively
(打开当前目录或者文件下;递归地列出子目录)
~]# ls -s --size print the allocated size of each file, in blocks
(显示每个文件或者目录所分配的块大小)
~]# ls -S sort by file size
(按照文件大小排序)
~]# ls -t sort by modification time
(按照修改时间排序)
~]# ls -u with -lt: sort by, and show, access time with -l:
show access time and sort by name otherwise:
sortby access time
(配合-t选项;例如~]# ls -ut 按照访问和修改时间重新排序格式)
~]# ls -U do not sort; list entries in directory order
(不排序,按照文件或者目录存放顺序显示)
~]# ls -v natural sort of (version) numbers within text
(按照文本中的版本号自然排序)
~]# ls -x list entries by lines instead of by columns
(按行而不是列表的进行排序)
~]# ls -X sort alphabetically by entry extension
(按字母顺序进行列表排序)
~]# ls -1 list one file per line
(列出每行一个文件的方式进行排序)
~]# ls -Z Display security context so it fits on most dis-
plays. Displays only mode, user, group, security
context and file name.
(上下显示用户、组、安全、文件或者目录信息)
新手上路,请照顾
作者:小马哥(xiaomag)
本文出自 “小马哥Linux系统运维” 博客,转载请与作者联系!
相关文章推荐
- mysql 触发器示例
- lvs四种负载均衡类型,十种调度算法
- 日志工具类
- sdut oj2131 数据结构实验之栈一:进制转换
- 安卓自带的倒计时方法
- 短信验证
- 算法竞赛入门经典3.5 谜题UVa455
- java日期
- 【杭电1181】变形课
- bash的基本特性详细讲解
- C++ STL 之 lower_bound and upper_bound
- Where Amazing Happens(打表)
- Python(切片)
- POJ 3170 Knights of Ni (暴力,双向BFS)
- SQL Server 常用的数据类型
- 掌握zigbee网络里的相关的重要概论
- List remove注意点
- HDOJ-1241 Oil Deposits
- 关于火狐和IE下select控制div
- bat面试内容