A
A
Alexey Blyshko2015-08-07 13:47:02
linux
Alexey Blyshko, 2015-08-07 13:47:02

Why is the /tmp partition implicitly populated without creating files?

I want to understand why I can't see files in /tmp that take up disk space with the help of file managers

$ sudo du --max-depth=0 -h /tmp
5,1M	/tmp

Although this place is actively consumed, according to monitoring data
$ sudo df -h
Файловая система Размер Использовано  Дост Использовано% Cмонтировано в
/dev/sda1          8,2G         6,3G  1,5G           81% /
udev                10M            0   10M            0% /dev
tmpfs              1,6G         129M  1,5G            9% /run
tmpfs              3,9G         256M  3,7G            7% /dev/shm
tmpfs              5,0M         4,0K  5,0M            1% /run/lock
tmpfs              3,9G            0  3,9G            0% /sys/fs/cgroup
/dev/sda7          360M         333M  4,9M           99% /tmp
/dev/sda5          2,7G         1,3G  1,4G           48% /var
/dev/sda8           92G          53G   36G           60% /home
tmpfs              799M          36K  799M            1% /run/user/1000

I have already found out that this affects the terminator - a tiled terminal emulator. Most likely, it stores the history of console output there, it’s not so difficult to score 300 megabytes per week with raw text output.
My question is, how does he do it? I do not understand the mechanism of what is happening.
OS - Debian Jessie if that matters.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-08-07
@nekt

Try looking for unclosed deleted files.
Somehow so

lsof -nP | grep '(deleted)'

Most likely you have a bunch of unclosed deleted files there.
Why? Because the files created by the emulator are incorrectly deleted / rotated.

E
Evgeny Melnik, 2015-08-13
@JEKA_JS

If this causes any problems, then tmpfs can be used. At the same time, temporary data will disappear when it is turned off, since the storage will be in ram, and in theory it can work faster. In /etc/fstab write:
tmpfs /tmp tmpfs defaults 0 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question