美文网首页LinuxLinux学习之路嵌入式
Linux 查看当前目录及子目录文件及文件夹占用存储大小

Linux 查看当前目录及子目录文件及文件夹占用存储大小

作者: 承诺一时的华丽 | 来源:发表于2020-03-30 10:16 被阅读0次

max-depth 子目录级别

  • 查看1级子目录
> sudo du -h -x --max-depth=1
38M     ./etc
25M     ./root
11M     ./tmp
16G     ./var
3.9G    ./usr
8.6G    ./home
0       ./media
0       ./mnt
53G     ./opt
0       ./srv
21G     ./temp
100G    .
  • 查看2级子目录
> sudo du -h -x --max-depth=2
395M    ./hadoop-bin/data
395M    ./hadoop-bin
2.8M    ./mysql/mysql
4.0K    ./mysql/performance_schema
104K    ./mysql/test
227M    ./mysql/swupl@002dsdc
1.7M    ./mysql/new@002drad
415M    ./mysql
12K     ./redis
31M     ./website/sdc-swupl
31M     ./website
21G     ./backup/clouddoc
0       ./backup/logs
21G     ./backup
21G     .

相关文章

网友评论

    本文标题:Linux 查看当前目录及子目录文件及文件夹占用存储大小

    本文链接:https://www.haomeiwen.com/subject/fpumuhtx.html