linux 中实现将目录中的文件仅显示大小和文件名

发布时间 2023-10-01 22:32:14作者: 小鲨鱼2018

 

001、

[root@pc1 test]# ls                                ## 测试文件
a.txt  b.txt
[root@pc1 test]# ll -h
total 110M
-rw-r--r--. 1 root root  10M Oct  1 22:13 a.txt
-rw-r--r--. 1 root root 100M Oct  1 22:13 b.txt
[root@pc1 test]# du -h *                           ## 仅显示文件的大小
10M     a.txt
100M    b.txt

 。