Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

/dev/sda1
 /tmp
/dev/shm
tmpfs

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

thx

share|improve this question

migrated from stackoverflow.com Sep 14 '11 at 0:15

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

1 Answer 1

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

Your Answer

 
discard

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