We are constantly low on space and look for files are installed programs in /tmp
on out server. I notice the following for tmp but can't find a large file in /tmp
.
drwxrwxrwt. 27 root root 170131456 Jun 25 06:06 tmp
When I run
sudo du .
the total is 201184
, where is the discrepancy in size coming from?
du
is (by default) the number of 1024-byte blocks. So that shows around 196MiB used by/tmp
and all its component directories and files. The size reported byls
is just the size of the/tmp
directory (namelist), and is 162MiB, so you have around 33MiB of files beneath that. Adf
report would tell more. The bottom line is that at one time,/tmp
contained two or three million files at once (depending on the file system it belongs to). – Paul_Pedant Jun 25 '20 at 16:12