Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why is /tmp diretory on my system showing 690 Mb full, whereas du -sh /tmp shows only 72K full?

drwxrwxrwt 2 lightdm lightdm  4096 Aug 29 21:49 at-spi2
drwx------ 2 ankit   ankit    4096 Aug 29 21:50 keyring-0JTfoY
drwx------ 2 ankit   ankit    4096 Aug 29 21:44 keyring-rChLLL
drwx------ 2 root    root    16384 Jul 22 02:10 lost+found
drwx------ 2 ankit   ankit    4096 Jan  1  1970 orbit-ankit
drwx------ 2 lightdm lightdm  4096 Aug 29 21:50 pulse-2L9K88eMlGn7
drwx------ 2 root    root     4096 Aug 29 21:44 pulse-PKdhtXMmr18n
drwx------ 2 ankit   ankit    4096 Aug 29 21:50 pulse-zR1TZUAZfmQW
drwx------ 2 ankit   ankit    4096 Aug 29 21:44 ssh-dlslOXOq2203
drwx------ 2 ankit   ankit    4096 Aug 29 21:50 ssh-MrQQVRyy3316
-rw------- 1 ankit   ankit       0 Aug 29 21:45 tmp0qnNG4
-rw------- 1 ankit   ankit       0 Aug 29 21:50 tmpVvSMt6
-rw------- 1 ankit   ankit       0 Aug 29 21:49 tmpy9Gadz
-rw-rw-r-- 1 lightdm lightdm     0 Aug 29 21:44 unity_support_test.0

ankit@duster:/tmp$ df -h
df: `/home/ankit/.gvfs': Transport endpoint is not connected
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        79G   11G   65G  14% /
udev            2.9G  4.0K  2.9G   1% /dev
tmpfs           1.2G  868K  1.2G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.9G  220K  2.9G   1% /run/shm
/dev/sda7        38G  690M   35G   2% /tmp
/dev/sda5        93G   26G   63G  30% /home
/dev/sda6        93G  1.6G   87G   2% /boot
/dev/sda3       154G   69G   78G  48% /home/mount_150
ankit@duster:/tmp$ sudo du -sh /tmp/ 72K    

enter image description here

share|improve this question
Is sda7 your temp mounted , or temp partition . ANd run sudo du -sh /dev/sda7/tmp/ to know actual size. 72k is size of temp from /dev/sda1 i guess – atenz Aug 29 '12 at 17:05
it is a manually created partition(at the time of boot). and sudo du -sh /dev/sda7/tmp/ isn't running – Ankit Aug 29 '12 at 17:14
My aim was to point , that cross check the size of Temp of sda1 (if present) in Root / directory , it is most possibly 72 k , which seems different than sda7 /temp – atenz Aug 29 '12 at 17:18

It is possible for programs to unlink files but still keep them open. Such a file will still consume space until all programs stop accessing it, either by closing it or by terminating.

This is normal behaviour on Unix. It is common for programs to immediately unlink temporary files in this way in order to make sure that they disappear eventually.

Use lsof -a +L1 to see a listing of files in this state, together with the processes responsible.

share|improve this answer
i ran the command there are only two files that are listed under /tmp but they are also deleted. I have edited my post to include the output. – Ankit Aug 30 '12 at 3:25
Note that this is one of the major differences to Windows, where files go away when deleted but they cannot be deleted while still open. – Thorbjørn Ravn Andersen Mar 12 '13 at 10:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.