1. 程式人生 > >Linux出現cannot create temp file for here-document: No space left on device的問題解決

Linux出現cannot create temp file for here-document: No space left on device的問題解決

查找 顯示錯誤 磁盤 depth target href -s reat temp

在終端輸入:cd /ho 按tab鍵時,顯示錯誤:

bash: cannot create temp file for here-document: No space left on device

這是由於該磁盤的空間已經滿了,這時候可以進行擴容,或者將該磁盤的部分目錄遷移到別的磁盤。

以下為解決思路,查找最大的文件,然後將其幹掉:

1、使用命令df -h 查看硬盤空間

技術分享

2、命令top查看cpu及內存

技術分享

3、使用命令du -h –max-depth=1 /var/log/* 查看/var/log路徑下文件的大小

4、du -sh /* 查看哪個目錄最大,一步一步的查找大文件

5、使用du -h --max-depth=1查找最大的文件,參考:http://www.cnblogs.com/kerrycode/p/4391859.html

轉自:http://www.cnblogs.com/EasonJim/p/6833354.html

Linux出現cannot create temp file for here-document: No space left on device的問題解決