linux - ubuntu 用户目录下的tmp目录是干嘛的?占用了很大的空间,可以删除吗?
怪我咯
怪我咯 2017-04-17 11:30:47
0
3
787

路径:/home/{username}/tmp

占用了我好几个G的空间。里面有这样几个文件
customization-scripts
remaster-apt-cache
remaster-iso
remaster-root
remaster-root-home
build.log

可以删除吗?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
迷茫

The questioner is talking about tmp in the user directory instead of /tmp. From the directory you listed above, it seems that it may be apt cache. You can execute the command sudo apt-get clean to clean it up, and then you can see that the directory is smaller. without.

Ty80

Never touch /tmp if your system is running any meaningful tasks.

But if the things in /tmp linger for a long time, appear every time you restart, and will not disappear automatically, then I don’t think you have to be dogmatic about “/tmp must not be moved.”

If these few Gs are really important to you, then please be prepared before you start: ① Turn on the computer; ② Use root privileges to delete them all at once; ③ Restart immediately.

Tell me about my experience. I once used a cPanel virtual host. For a while, I frequently encountered the problem of file upload failure. Detailed analysis found that the program was correct. The problem was that the disk was full when writing to /tmp. cPanel showed that the usage of /tmp had reached 100. %.

The virtual host has limited permissions (not even SSH). As a result, there happened to be a typhoon on the southeast coast in those few days. Unfortunately, the host company was fleeing the disaster and could not be contacted at all... So I had no choice but to make a high-risk one. The thing is, use a php script to remove all the things in /tmp that I have the right to delete. As a result, the /tmp usage returned to 3%, uploading immediately returned to normal, and the operation has been uneventful so far.

左手右手慢动作
  1. Do not remove files from this directory unless you know exactly what you are doing!
  2. Filesystem Hierachy Standard
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template