Chinaunix首页 | 论坛 | 博客
  • 博客访问: 557387
  • 博文数量: 142
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1452
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-12 16:28
文章分类

全部博文(142)

文章存档

2016年(10)

2015年(60)

2014年(72)

我的朋友

分类: LINUX

2015-02-03 16:27:58

du命令显示文件(包括目录)的磁盘使用情况,默认情况下,递归显示当前目录下所有文件夹的磁盘使用情况

点击(此处)折叠或打开

  1. gwwu@hz-dev2.aerohive.com:~/test/pipe>ls -al
  2. 总用量 104
  3. drwxrwxr-x 4 gwwu gwwu 4096 4月 15 15:30 .
  4. drwxr-xr-x 35 gwwu gwwu 4096 4月 9 16:32 ..
  5. -rwxrwxr-x 1 gwwu gwwu 8947 4月 14 09:32 add2
  6. -rw-rw-r-- 1 gwwu gwwu 635 4月 14 09:32 add2.c
  7. -rwxrwxr-x 1 gwwu gwwu 13199 4月 14 10:10 add2_filter
  8. -rw-rw-r-- 1 gwwu gwwu 2041 4月 14 10:10 add2_filter.c
  9. drwxrwxr-x 2 gwwu gwwu 4096 4月 15 15:30 fifo
  10. -rwxrwxr-x 1 gwwu gwwu 10472 4月 14 16:43 myuclc
  11. -rw-r--r-- 1 gwwu gwwu 519 4月 14 16:45 myuclc.c
  12. -rwxrwxr-x 1 gwwu gwwu 9748 4月 8 17:42 pipe
  13. -rw-r--r-- 1 gwwu gwwu 702 4月 8 17:42 pipe.c
  14. -rwxrwxr-x 1 gwwu gwwu 12577 4月 13 15:20 pipe_more
  15. -rw-rw-r-- 1 gwwu gwwu 1981 4月 13 15:20 pipe_more.c
  16. drwxrwxr-x 2 gwwu gwwu 4096 4月 15 15:29 popen




  1. gwwu@hz-dev2.aerohive.com:~/test/pipe>du
  2. 28 ./fifo
  3. 72 ./popen
  4. 192 .
常用的option选项
-a, --all
              write counts for all files, not just directories  所有文件,不仅仅是目录的总值。
-b, --bytes
              equivalent to ‘--apparent-size --block-size=1’  以字节大小显示
-h, --human-readable  以适合操作者阅读的方式
              print sizes in human readable format (e.g., 1K 234M 2G)
-s, --summarize   仅显示目录总大小
              display only a total for each argument

点击(此处)折叠或打开

  1. gwwu@hz-dev2.wgw.com:~/test/pipe>du
  2. 28 ./fifo
  3. 72 ./popen
  4. 192 .
  5. gwwu@hz-dev2.wgw.com:~/test/pipe>du -h
  6. 28K ./fifo
  7. 72K ./popen
  8. 192K .
  9. gwwu@hz-dev2.wgw.com:~/test/pipe>du -b
  10. 21857 ./fifo
  11. 49813 ./popen
  12. 136587 .
  13. gwwu@hz-dev2.wgw.com:~/test/pipe>du -bh
  14. 22K ./fifo
  15. 49K ./popen
  16. 134K .
  17. gwwu@hz-dev2.wgw.com:~/test/pipe>du -a
  18. 16 ./add2_filter
  19. 16 ./pipe_more
  20. 4 ./add2_filter.c
  21. 12 ./add2
  22. 4 ./fifo/fifo.c
  23. 16 ./fifo/fifo1
  24. 4 ./fifo/fifo1.c
  25. 28 ./fifo
  26. 4 ./add2.c
  27. 12 ./myuclc
  28. 4 ./pipe.c
  29. 12 ./pipe
  30. 4 ./myuclc.c
  31. 4 ./popen/popen_more.c
  32. 12 ./popen/popen_more
  33. 4 ./popen/popen_w.c
  34. 4 ./popen/popen_pipe.c
  35. 4 ./popen/popen_r.c
  36. 12 ./popen/popen_w
  37. 4 ./popen/popen.c
  38. 12 ./popen/popen_pipe
  39. 12 ./popen/popen_r
  40. 72 ./popen
  41. 4 ./pipe_more.c
  42. 192 .
  43. gwwu@hz-dev2.wgw.com:~/test/pipe>du -ah
  44. 16K ./add2_filter
  45. 16K ./pipe_more
  46. 4.0K ./add2_filter.c
  47. 12K ./add2
  48. 4.0K ./fifo/fifo.c
  49. 16K ./fifo/fifo1
  50. 4.0K ./fifo/fifo1.c
  51. 28K ./fifo
  52. 4.0K ./add2.c
  53. 12K ./myuclc
  54. 4.0K ./pipe.c
  55. 12K ./pipe
  56. 4.0K ./myuclc.c
  57. 4.0K ./popen/popen_more.c
  58. 12K ./popen/popen_more
  59. 4.0K ./popen/popen_w.c
  60. 4.0K ./popen/popen_pipe.c
  61. 4.0K ./popen/popen_r.c
  62. 12K ./popen/popen_w
  63. 4.0K ./popen/popen.c
  64. 12K ./popen/popen_pipe
  65. 12K ./popen/popen_r
  66. 72K ./popen
  67. 4.0K ./pipe_more.c
  68. 192K .
  69. gwwu@hz-dev2.wgw.com:~/test/pipe>du -ab
  70. 13199 ./add2_filter
  71. 12577 ./pipe_more
  72. 2041 ./add2_filter.c
  73. 8947 ./add2
  74. 2084 ./fifo/fifo.c
  75. 13603 ./fifo/fifo1
  76. 2074 ./fifo/fifo1.c
  77. 21857 ./fifo
  78. 635 ./add2.c
  79. 10472 ./myuclc
  80. 702 ./pipe.c
  81. 9748 ./pipe
  82. 519 ./myuclc.c
  83. 1085 ./popen/popen_more.c
  84. 11976 ./popen/popen_more
  85. 322 ./popen/popen_w.c
  86. 740 ./popen/popen_pipe.c
  87. 281 ./popen/popen_r.c
  88. 9542 ./popen/popen_w
  89. 1812 ./popen/popen.c
  90. 10558 ./popen/popen_pipe
  91. 9401 ./popen/popen_r
  92. 49813 ./popen
  93. 1981 ./pipe_more.c
  94. 136587 .
  95. gwwu@hz-dev2.wgw.com:~/test/pipe>du -abh
  96. 13K ./add2_filter
  97. 13K ./pipe_more
  98. 2.0K ./add2_filter.c
  99. 8.8K ./add2
  100. 2.1K ./fifo/fifo.c
  101. 14K ./fifo/fifo1
  102. 2.1K ./fifo/fifo1.c
  103. 22K ./fifo
  104. 635 ./add2.c
  105. 11K ./myuclc
  106. 702 ./pipe.c
  107. 9.6K ./pipe
  108. 519 ./myuclc.c
  109. 1.1K ./popen/popen_more.c
  110. 12K ./popen/popen_more
  111. 322 ./popen/popen_w.c
  112. 740 ./popen/popen_pipe.c
  113. 281 ./popen/popen_r.c
  114. 9.4K ./popen/popen_w
  115. 1.8K ./popen/popen.c
  116. 11K ./popen/popen_pipe
  117. 9.2K ./popen/popen_r
  118. 49K ./popen
  119. 2.0K ./pipe_more.c
  120. 134K .
  121. gwwu@hz-dev2.wgw.com:~/test/pipe>ls -al
  122. 总用量 104
  123. drwxrwxr-x 4 gwwu gwwu 4096 4月 15 15:30 .
  124. drwxr-xr-x 35 gwwu gwwu 4096 4月 9 16:32 ..
  125. -rwxrwxr-x 1 gwwu gwwu 8947 4月 14 09:32 add2
  126. -rw-rw-r-- 1 gwwu gwwu 635 4月 14 09:32 add2.c
  127. -rwxrwxr-x 1 gwwu gwwu 13199 4月 14 10:10 add2_filter
  128. -rw-rw-r-- 1 gwwu gwwu 2041 4月 14 10:10 add2_filter.c
  129. drwxrwxr-x 2 gwwu gwwu 4096 4月 15 15:30 fifo
  130. -rwxrwxr-x 1 gwwu gwwu 10472 4月 14 16:43 myuclc
  131. -rw-r--r-- 1 gwwu gwwu 519 4月 14 16:45 myuclc.c
  132. -rwxrwxr-x 1 gwwu gwwu 9748 4月 8 17:42 pipe
  133. -rw-r--r-- 1 gwwu gwwu 702 4月 8 17:42 pipe.c
  134. -rwxrwxr-x 1 gwwu gwwu 12577 4月 13 15:20 pipe_more
  135. -rw-rw-r-- 1 gwwu gwwu 1981 4月 13 15:20 pipe_more.c
  136. drwxrwxr-x 2 gwwu gwwu 4096 4月 15 15:29 popen
  137. gwwu@hz-dev2.wgw.com:~/test/pipe>ls -alh
  138. 总用量 104K
  139. drwxrwxr-x 4 gwwu gwwu 4.0K 4月 15 15:30 .
  140. drwxr-xr-x 35 gwwu gwwu 4.0K 4月 9 16:32 ..
  141. -rwxrwxr-x 1 gwwu gwwu 8.8K 4月 14 09:32 add2
  142. -rw-rw-r-- 1 gwwu gwwu 635 4月 14 09:32 add2.c
  143. -rwxrwxr-x 1 gwwu gwwu 13K 4月 14 10:10 add2_filter
  144. -rw-rw-r-- 1 gwwu gwwu 2.0K 4月 14 10:10 add2_filter.c
  145. drwxrwxr-x 2 gwwu gwwu 4.0K 4月 15 15:30 fifo
  146. -rwxrwxr-x 1 gwwu gwwu 11K 4月 14 16:43 myuclc
  147. -rw-r--r-- 1 gwwu gwwu 519 4月 14 16:45 myuclc.c
  148. -rwxrwxr-x 1 gwwu gwwu 9.6K 4月 8 17:42 pipe
  149. -rw-r--r-- 1 gwwu gwwu 702 4月 8 17:42 pipe.c
  150. -rwxrwxr-x 1 gwwu gwwu 13K 4月 13 15:20 pipe_more
  151. -rw-rw-r-- 1 gwwu gwwu 2.0K 4月 13 15:20 pipe_more.c
  152. drwxrwxr-x 2 gwwu gwwu 4.0K 4月 15 15:29 popen
  153. gwwu@hz-dev2.wgw.com:~/test/pipe>

点击(此处)折叠或打开

  1. gwwu@hz-dev2.aerohive.com:~/test/pipe>du
  2. 28 ./fifo
  3. 72 ./popen
  4. 192 .
  5. gwwu@hz-dev2.aerohive.com:~/test/pipe>du -s
  6. 192 .
  7. gwwu@hz-dev2.aerohive.com:~/test/pipe>

阅读(664) | 评论(0) | 转发(0) |
0

上一篇:DHCP报文解析

下一篇:gcc 编译

给主人留下些什么吧!~~