1. 程式人生 > >-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

登陸Linux系統後, cd 到某個指定目錄時使用tab鍵的時候報以下錯誤:

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

原因: 不能建立臨時檔案文件,裝置上沒有剩餘空間(告訴我們磁碟空間滿了)

1.用命令df -h 檢視硬碟空間

[[email protected] ~]# df -h

2.檢視哪個目錄佔用硬碟空間最大

[[email protected] ~]# du -sh /*

3.一級一級向下查詢大檔案

[[email protected]

~]# du -sh /home/*

4.找出最大檔案

解決方案:

(1) 如果最大檔案時日誌檔案或者備份檔案可以清空此檔案;

(2) 如果想保留這個最大檔案, 則只能擴大硬碟空間了.