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