ls -la /etc
ls愿意是list,命令所在路径:/bin/ls
-a --all 显示所有文件,包括隐藏文件,隐藏文件以点好.为文件名开头,如:.bashrc
-l 详细信息显示 long长格式显示
-d 查看目录属性,只查看目录,不包含其下的文件,子目录等
-I 查看文件的ID
[root@localhost ~]# ll
total 4
-rw-------. 1 root root 1283 Apr 22 16:09 anaconda-ks.cfg
1文件的引用基数?
root 所有者user/owner,一般是创建者
root group所属组,用户集合
1283 文件大小,单位字节
Apr 22 16:09 文件最后修改时间
anaconda-ks.cfg 文件名
1283 显示的是字节,如果文件太大,非常不容易看,可以使用-h命令,human人性化显示,自动修改单位
[root@localhost ~]# ls -lh
total 4.0K
-rw-------. 1 root root 1.3K Apr 22 16:09 anaconda-ks.cfg
用户身份:
U/user G/group O/others
所有者 所属组 其他
[root@localhost /]# ll
total 16
lrwxrwxrwx. 1 root root 7 Apr 22 15:57 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 Apr 22 16:09 boot
drwxr-xr-x. 19 root root 3100 Apr 22 23:36 dev
drwxr-xr-x. 74 root root 8192 Apr 22 23:36 etc
第1位:文件类型
d directory 表示目录
l link 软链接
<!--[if !supportLists]-->- - <!--[endif]-->表示是是文件
第234位:User的权限
rwx read write execute 读 写 执行
第456位:Group的权限
r-x 读 执行权限,没有写权限
第789位:Other的权限
r-x 读 执行权限,没有写权限