Super User is a question and answer site for computer enthusiasts and power users. 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

I'm actually putting some files into temporary folder /tmp. And I want to know the capacity of /tmp. I do the 'df -h':

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              52G   11G   39G  22% /
tmpfs                 7.9G     0  7.9G   0% /dev/shm

So what's the capacity of /tmp folder?

Actually I'm a little bit confused about these concepts:


I bet the first two are disk; while the third is memory, right?


share|improve this question

migrated from Sep 14 '11 at 0:15

This question came from our site for professional and enthusiast programmers.

Filesystem maps to the physical hardware you use for your filesystems. In UNIX everything is more or less represented as a file, so your /dev/sda1 is nothing more than your hard drive. You can use udevinfo -q all -n /dev/sda1 to get more information about it if you're curious.

tempfs is a little different. It's a filesystem that is made from a block of your RAM, but besides that, the principle is the same.

The "mounted on" directory tells you where the files stored on the Filesystem devices are mapped to in your directory structure. So everything stored in /dev/sda1 is accessible from / while everything in tempfs is available in /dev/shm.

Since /tmp is mounted as part of / which is part of /dev/sda1, you have 39G free on the filesystem that /tmp is part of.

The best way to check for free space is to run df directly on the directory you are curious about:

df -h /tmp

share|improve this answer
Not to be nitpicky, but /dev/sda1 is a partition on the drive /dev/sda would be the drive. – OldWolf Sep 14 '11 at 2:36

You must log in to answer this question.