首页 > 其他 > 详细

2.3ls命令

时间:2018-03-12 15:06:51      阅读:183      评论:0      收藏:0      [点我收藏+]
2.3ls命令

1.ls-l
ls -l 用来列出文件的详细信息

[root@localhost ~]# ls -l
总用量 4
-rw-------. 1 root root 1422 1月 24 04:18 anaconda-ks.cfg
文件属性 文件权限 表示有多少个文件使用了相同的indoe号 所有者 所属组 大小 时间

2.ls-i
查看indoe号 用-i看
[root@localhost ~]# ls -i
33582989 anaconda-ks.cfg
为indoe号
indoe就是存一些
文件的所有者 文件的所属组 组下会有多个用户 文件的大小
如果indeo的号一样 就是同一个文件 只是名字不一样

3.

[root@localhost ~]# ls -lh anaconda-ks.cfg
-rw-------. 1 root root 1.4K 1月 24 04:18 anaconda-ks.cfg

更人性化的显示文件大小显示单位1.4k

4.

[root@localhost ~]# ls -la
总用量 28
dr-xr-x---. 2 root root 135 1月 24 05:39 .
dr-xr-xr-x. 17 root root 224 1月 24 04:18 ..
-rw-------. 1 root root 1422 1月 24 04:18 anaconda-ks.cfg
-rw-------. 1 root root 703 3月 9 21:54 .bash_history
-rw-r--r--. 1 root root 18 12月 29 2013 .bash_logout
-rw-r--r--. 1 root root 176 12月 29 2013 .bash_profile
-rw-r--r--. 1 root root 176 12月 29 2013 .bashrc
-rw-r--r--. 1 root root 100 12月 29 2013 .cshrc
-rw-r--r--. 1 root root 129 12月 29 2013 .tcshrc
[root@localhost ~]# ls
anaconda-ks.cfg

ls -la 查看目录下的所有隐藏文件 或者目录

-i 看indoe

5.

[root@localhost ~]# ls -lta
总用量 28
dr-xr-x---. 3 root root 147 3月 12 13:58 .
drwxr-xr-x. 2 root root 6 3月 12 13:58 .ssh
dr-xr-xr-x. 18 root root 236 3月 12 13:57 ..
-rw-------. 1 root root 703 3月 9 21:54 .bash_history
-rw-------. 1 root root 1422 1月 24 04:18 anaconda-ks.cfg
-rw-r--r--. 1 root root 18 12月 29 2013 .bash_logout
-rw-r--r--. 1 root root 176 12月 29 2013 .bash_profile
-rw-r--r--. 1 root root 176 12月 29 2013 .bashrc
-rw-r--r--. 1 root root 100 12月 29 2013 .cshrc
-rw-r--r--. 1 root root 129 12月 29 2013 .tcshrc

ls -lta 按时间顺序排序

6.

[root@localhost ~]# ls -l /root/
总用量 4
-rw-------. 1 root root 1422 1月 24 04:18 anaconda-ks.cfg

[root@localhost ~]# ls -ld /root/
dr-xr-x---. 3 root root 147 3月 12 13:58 /root/

-ld 只列目录本身 不加回把目录下的文件和本身列出来

man ls 查看更多的用法

ll=ls-l 做的别名

2.3ls命令

原文:http://blog.51cto.com/13038669/2085478

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!