Linux ls命令小结

ls 与 ll 的关系

[root@localhost test]# alias ll
alias ll='ls -l --color=auto'
ll是ls -l的别名

ls -lhi:

[root@localhost etc]# ls -lhi
total 1.2M
 33963054 -rw-r--r--.  1 root root   16 Sep 25 05:17 adjtime
 33554592 -rw-r--r--.  1 root root 1.5K Jun  7  2013 aliases
 34344442 -rw-r--r--.  1 root root  12K Sep 25 05:20 aliases.db
 67182436 drwxr-xr-x.  2 root root 4.0K Aug  4  2017 alternatives
 34014508 -rw-------.  1 root root  541 Jul 27  2015 anacrontab
 33847234 -rw-r--r--.  1 root root   55 Mar  6  2015 asound.conf
 34240733 drwxr-x---.  3 root root   41 Sep 25 05:14 audisp
101290939 drwxr-x---.  3 root root   79 Sep 25 05:20 audit
100988216 drwxr-xr-x.  2 root root   33 Sep 25 05:13 avahi
 67149972 drwxr-xr-x.  2 root root   48 Sep 25 05:14 bash_completion.d

h表示以K、M、G为单位计量文件大小,i表示显示文件inode

ls -l --time-style=long-iso

	[root@localhost etc]# ls -l --time-style=long-iso
total 1140
-rw-r--r--.  1 root root 16 2018-09-25 05:17 adjtime
-rw-r--r--.  1 root root   1518 2013-06-07 22:31 aliases
-rw-r--r--.  1 root root  12288 2018-09-25 05:20 aliases.db
drwxr-xr-x.  2 root root   4096 2017-08-04 21:45 alternatives
-rw-------.  1 root root541 2015-07-27 18:57 anacrontab
-rw-r--r--.  1 root root 55 2015-03-06 03:35 asound.conf
drwxr-x---.  3 root root 41 2018-09-25 05:14 audisp
drwxr-x---.  3 root root 79 2018-09-25 05:20 audit
drwxr-xr-x.  2 root root 33 2018-09-25 05:13 avahi
drwxr-xr-x.  2 root root 48 2018-09-25 05:14 bash_completion.d
-rw-r--r--.  1 root root   2835 2015-08-12 22:21 bashrc

--time-style=long-iso 可以以比较易读的形式显示文件修改时间(mtime)
posted @ 2018-11-01 20:14  HzdWwZz"LJF  阅读(297)  评论(0)    收藏  举报