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

版权声明:希望大家多多指教 https://blog.csdn.net/muriyue6/article/details/84783107

登陆Linux系统后, cd 到某个指定目录时使用tab键的时候报以下错误:

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

原因: 不能创建临时文件文档,设备上没有剩余空间(告诉我们磁盘空间满了)

1.用命令df -h 查看硬盘空间

[root@instance-0pk09gjj ~]# df -h

2.查看哪个目录占用硬盘空间最大

[root@instance-0pk09gjj ~]# du -sh /*

3.一级一级向下查找大文件

[root@instance-0pk09gjj ~]# du -sh /home/*

4.找出最大文件

解决方案:

(1) 如果最大文件时日志文件或者备份文件可以清空此文件;

(2) 如果想保留这个最大文件, 则只能扩大硬盘空间了.

猜你喜欢

转载自blog.csdn.net/muriyue6/article/details/84783107