linux出現tmp空間滿的情況解決


cd命令tab補全的時候報錯:

cd /ro-bash: cannot create temp file for here-document: No space left on device
-bash: cannot create temp file for here-document: No space left on device
-bash: cannot create temp file for here-document: No space left on device
-bash: cannot create temp file for here-document: No space left on device
-bash: cannot create temp file for here-document: No space left on device
df -hl查看之后發現tmp空間是滿的(只有1M,腦殘管理員。。。。)

刪掉了無用的數據之后正常

后來搜了一下,也可以自己建立一個tmp目錄,而不是將文件寫在系統的tmp目錄中:

https://blog.csdn.net/feihongwang/article/details/17383833

解決辦法 mkdir  文件夾——你可以使用的文件夾 比如說 mkdir /mnt/kernelsrc/tmp

然后只要export TMPDIR=/mnt/kernelsrc/tmp

這樣就不會出現 tmp文件夾不夠用的情況。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM