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

出现这种问题,一般是磁盘空间满了,或者是inode满了
使用命令:
df -h查询磁盘空间
df -i 查询inode占用

Filesystem       Inodes   IUsed    IFree IUse% Mounted on
/dev/xvda1      1310720 1310720        0  100% /
tmpfs           8246391       6  8246385    1% /dev/shm
/dev/xvdb1     65536000   18071 65517929    1% /Data
/dev/xvdc1     65536000      12 65535988    1% /yohodata

系统排序哪个文件夹占用inode最多

for i in /*; do echo $i; find $i | wc -l; done

找到之后,重复执行上面的命令进入下一级目录,直到找到最终的文件,删除它

原文地址:https://www.cnblogs.com/yissheng/p/7085782.html