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文件夹不够用的情况。

posted @ 2018-04-04 11:14  rainsoul  Views(26087)  Comments(2Edit  收藏  举报