ls命令

•概述
ls命令用來顯示目標列表

•選項
-a:顯示所有文件,包括隱藏文件
-A:顯示除.和..之外的所有文件
-l:--long, 長格式列表,即顯示文件的詳細屬性信息
-h, --human-readable:對文件大小單位換算;換算後結果可能會非精確值
-d:查看目錄自身而非其內部的文件列表
-r: reverse, 逆序顯示
-R:recursive,遞歸顯示

•實例
[root@localhost etc]# ls
abrt fprintd.conf man_db.conf
[root@localhost etc]# ls -a
. fonts makedumpfile.conf.sample rsyncd.conf
.. fprintd.conf man_db.conf
[root@localhost etc]# ls -l
總用量 1536
drwxr-xr-x. 3 root root 97 8月 7 01:51 abrt
-rw-r--r--. 1 root root 16 8月 7 02:02 adjtime
[root@localhost etc]# ls -lh
總用量 1.5M
-rw-r--r--. 1 root root 1.5K 6月 7 2013 aliases
-rw-r--r--. 1 root root 12K 8月 6 18:05 aliases.db
drwxr-xr-x. 2 root root 49 8月 7 01:52 alsa
drwxr-xr-x. 2 root root 4.0K 8月 7 01:58 alternatives
[root@localhost ~]# ls -ld /etc/
drwxr-xr-x. 139 root root 8192 1月 15 14:02 /etc/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章