From d3b6a539c2e0e933a30a84460f6f8f9dba8481a8 Mon Sep 17 00:00:00 2001 From: Eric Chang Date: Tue, 2 Apr 2019 10:36:33 +0800 Subject: [PATCH] Daily Push --- content/post/transfer-cent62-using-rsync.md | 4 +- .../transfer-cent62-using-rsync/index.html | 4 +- public/tags/du/index.html | 56 ++++++++++++++++++- 3 files changed, 57 insertions(+), 7 deletions(-) diff --git a/content/post/transfer-cent62-using-rsync.md b/content/post/transfer-cent62-using-rsync.md index 376a0c31..11ff443f 100644 --- a/content/post/transfer-cent62-using-rsync.md +++ b/content/post/transfer-cent62-using-rsync.md @@ -183,7 +183,7 @@ BUT ...(沒錯,還是這個BUT) 我參考底下這篇,過程其實很順利 -http://stevesubuntutweaks.blogspot.com/2015/06/converting-raid1-array-to-raid5-using.html +https://stevesubuntutweaks.blogspot.com/2015/06/converting-raid1-array-to-raid5-using.html 但是只要我動到放boot 那組RAID,重開機之後,就完全沒有畫面..... @@ -395,7 +395,7 @@ gparted resize 太簡單了...直接用拉的就好了 好,都做完了,重開機見真章!看看到底有沒有成功? -![check result after reboot](http://i.imgur.com/uGzxA9t.png) +![check result after reboot](https://i.imgur.com/uGzxA9t.png) 空間順利放大了,打完收工! diff --git a/public/post/transfer-cent62-using-rsync/index.html b/public/post/transfer-cent62-using-rsync/index.html index bfb04e5b..e5e99773 100644 --- a/public/post/transfer-cent62-using-rsync/index.html +++ b/public/post/transfer-cent62-using-rsync/index.html @@ -299,7 +299,7 @@

我參考底下這篇,過程其實很順利

-

http://stevesubuntutweaks.blogspot.com/2015/06/converting-raid1-array-to-raid5-using.html

+

https://stevesubuntutweaks.blogspot.com/2015/06/converting-raid1-array-to-raid5-using.html

但是只要我動到放boot 那組RAID,重開機之後,就完全沒有畫面…..

@@ -510,7 +510,7 @@ df -h

好,都做完了,重開機見真章!看看到底有沒有成功?

-

check result after reboot

+

check result after reboot

空間順利放大了,打完收工!

diff --git a/public/tags/du/index.html b/public/tags/du/index.html index 3aeb6d35..c9150184 100644 --- a/public/tags/du/index.html +++ b/public/tags/du/index.html @@ -137,9 +137,59 @@ 找了一些工具,結果發現 durep 這個 ubuntu 內建的工具 基本上可以滿足我的需求

- - Continue reading - +

+我的需求其實很簡單

+ +
    +
  1. 可以指定目錄”深度”
  2. +
  3. 可以用圖表的方式顯示目前用量
  4. +
  5. 每天寄出報表
  6. +
+ +

來看一下 durep 執行的狀況 +如果只指定一層,那就是顯示該目錄底下的使用狀況

+ +
2018-10-29 15:50:21 [minion@tps006 ~]$ sudo durep -td 1 -sd /file
+[ /file   259.0G (0 files, 3 dirs) ]
+ 259.0G [############################# ] 100.00% Oct 25  2017 team/
+   1.7M [                              ]   0.00% Oct 23 14:04 html/
+ 741.1K [                              ]   0.00% Jul 11  2016 team_commons/
+2018-10-29 15:50:26 [minion@tps006 ~]$ sudo durep -td 1 -sd /file
+
+ +

如果指定兩層 +就顯示包含下一層目錄的磁碟使用量 好像廢話

+ +
2018-10-29 16:14:23 [mini@s006 ~]$ sudo durep -td 2 -sd /file
+[ /file   259.0G (0 files, 3 dirs) ]
+ 259.0G [############################# ] 100.00% Oct 25  2017 team/
+     259.0G [##############################] 100.00% Oct  3 15:08 tp/
+         0b [                              ]   0.00% Jul 11  2016 temporary/
+   1.7M [                              ]   0.00% Oct 23 14:04 html/
+     748.5K [############                  ]  43.04% Jun 22  2016 font-awesome/
+     282.2K [####                          ]  16.23% Jun 22  2016 css/
+     241.0K [####                          ]  13.86% Jun 22  2016 js/
+     222.9K [###                           ]  12.82% Jun 22  2016 img/
+     210.7K [###                           ]  12.11% Jun 22  2016 fonts/
+      18.6K [                              ]   1.07% Oct 23 14:04 index.html
+       8.5K [                              ]   0.49% Jun 22  2016 less/
+       2.2K [                              ]   0.12% Jun 22  2016 Gruntfile.js
+       1.7K [                              ]   0.10% Jun 22  2016 README.md
+       1.2K [                              ]   0.07% Jun 22  2016 mail/
+       1.1K [                              ]   0.06% Jun 22  2016 LICENSE
+       652b [                              ]   0.04% Jun 22  2016 package.json
+        12b [                              ]   0.00% Jun 22  2016 .gitignore
+ 741.1K [                              ]   0.00% Jul 11  2016 team_commons/
+     709.6K [############################  ]  95.75% Oct 23 14:05 tp/
+      31.5K [#                             ]   4.25% Oct 23 14:05 temporary/
+2018-10-29 16:14:36 [mini@s006 ~]$ 
+
+ +

搭配mail 使用,有點可惜的是在郵件內顯示,格式稍微有點跑掉 +不過至少需要看到的目錄總使用量(左上角),還有各個子目錄的用量都可以清楚的看到 +如果能夠有縮排就更好了!

+ +

https://i.imgur.com/ySNJJWx.png