Linux查询某个目录及其子目录下按文件大小排序

Linux find largest file in directory
The procedure to find largest files including directories in Linux is as follows:
Open the terminal application
Login as root user using the sudo -i command
Type du -a /dir/ | sort -n -r | head -n 20du will estimate file space usage
sort will sort out the output of du command
head will only show top 20 largest file in /dir/
Linux find a biggest files in /
Run the command:

$ sudo du -a /dir/ | sort -n -r | head -n 20
发布了16 篇原创文章 · 获赞 0 · 访问量 663

猜你喜欢

转载自blog.csdn.net/yaqiang2017/article/details/104081335