Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
如何快速調查檔案及資料夾所使用的容量 – unethost無限空間虛擬主機 技術分享部落格

如何快速調查檔案及資料夾所使用的容量

這篇教學,其實是我們針對unethost.com虛擬主機用戶所提供的,unethost.com的虛擬主機有搭配使用cpanel控制台,並有檔案總管的功能可使用,但唯一缺乏的指令,就是查看每個資料夾所使用的容量,以做空間容量的調節使用。

請參考我們下列說明:

1. 下載登入ssh的程式。請瀏覽網頁: http://ntu.csie.org/~piaip/pietty/
01

2.  解開所下載的程式,並執行。
02

3. 輸入您所使用的主機的IP (或是網域),port為: 15678,輸入後,請點下連線。
03

4. 請先輸入空間的帳號在點下鍵盤ENTER鍵後,
    在輸入密碼,並在點下鑑盤Enter鍵,輸入正確就會登入。 
   (帳號和密碼,可以用複製,貼上則是用滑鼠右鍵,而非平常使用的Ctrl-v功能)04

5. 正確登入後的畫面。
05

 

6.  通常檔案都是在 public_html底下,所以請輸入 cd public_html ,在ENTER 。
1

7. 請接著輸入 下列指令: du -sh *  (輸入後,請記得要ENTER) ,這時就會秀出public_html          底下的資料夾及檔案使用的容量大小。
2

8. 根據圖片發現 data 佔了 3.3G 容量,這時在使用 cd data切到 data資料夾底下後,
     在輸入一次 du -sh * ,這樣就可以逐步追查出,是什麼地方在消耗使用容量。

 

最後補充: 當您登入後,只顯示出下列字串:
Shell access is not enabled on your account!
If you need shell access please contact support.

這是因為權限問題,有些帳號預設是沒有開啟SSH的,將導致無法使用SSH,
這時請透過服務單連絡我們處理,我們就會去設定開啟。