【shell】linux 查看文件夹以及文件大小数目等信息

Date: 2018.7.18


1、参考:

https://www.cnblogs.com/jiu0821/p/8527950.html
https://www.cnblogs.com/newcaoguo/p/5896491.html

2、查看文件夹以及文件大小、数目等统计信息

方法一:

du -sh *
or du -h -d 0 *

-d表示遍历目录的深度,0表示当前目录。
man du: estimate file space usage

方法二:

ls -laths
3、统计当前目录及子目录下指定格式文件的数目
ls -lR | grep 'jpg$' | wc -l

man wc:word count

猜你喜欢

转载自blog.csdn.net/soaringlee_fighting/article/details/81094990